https://bugs.winehq.org/show_bug.cgi?id=43464
--- Comment #13 from Dmitry dz64@protonmail.com --- I've looked into the game auth protocol, here is how it works:
1. The game builds request string:
terrain=1&season=2&cqcarena=0&language=en&connCap=1&fTime=1535992761&machineId=ef4b8b36ef0c8c78&machineToken=5c6346f307aec7c4781ba9acb0c43d6fcf7dd33f85204a451df098344118c7eb407780336950d4602c8e9f055f924550&authToken=[My auth token here]
2. The string goes through some kind of encryption algorithm. The result is proportional to size of the original string. I cannot identify this algorithm - I need to do some research. 3. The result of encryption is encoded into base64 string. 4. That base64 string is attached as a part of URL for GET request:
GET /2.0/elite/user/login?p6rEJhO8YqpD5q0JKLRBD(long base64 encoded url)... HTTP/1.1 Host: api.orerve.net Accept: */* Retry: 1 User-Agent: EDGame/11.0/Win64 Encrypted: 1 Nonce: f64537d2a3a0edd2
5. The request is sent using SSL_Write from that static-linked OpenSSL library. 6. SSL_Write uses winsock send from wine to send this data. 7. Game server receives this request and responds with code 400. 8. CRC error message is displayed in the game window.
My debugger makes the game fail with segfault sometimes without any reason. Also there are a lot of calls to ntdll around this auth code. Functions like __wine_user_shared_data are called a lot.