Function at 0x408f10
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50aafd
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x5340e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x14], edi
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], edi
call fcn.0040cbe0
push 0
push 0
push 0
push 0
push str.WebSocket_Client
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
test esi, esi
jne 0x408f98
call fcn.0040ce60
mov dword [edi], esi
mov dword [edi + 0x10], 0
mov ecx, edi
push 0
mov dword [edi + 0x14], 0xf
push 0x52a5cb
mov byte [edi], 0
mov dword [ebp - 4], 0xffffffff
call fcn.00403db0
jmp 0x4091aa
push 0
push 0x2406
push str.localhost
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
test eax, eax
jne 0x408fc3
call fcn.0040d0c0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [edi], 0
jmp 0x408f6d
push 0
push 0
push 0
push 0
push str._json
push 0x52ace8
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x408ffa
call fcn.0040d320
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [edi], 0
jmp 0x408f6d
push 0
push 0
push 0
push 0
push 0
push 0
push eax
mov dword [ebp - 0x14], 0
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov esi, eax
mov dword [ebp - 0x2c], 0
push 0
push 0x52a5cb
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], 0xffffffff
call fcn.00403db0
mov dword [ebp - 4], 4
test esi, esi
je 0x409157
mov esi, dword [ebp - 0x3c]
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40916c
nop dword [eax + eax]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x40909f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str._WinHttpQueryDataAvailable
lea edx, [ebp - 0x34]
mov dword [ebp - 0x34], eax
call fcn.0040d800
add esp, 4
mov eax, dword [ebp - 0x30]
inc eax
push eax
call fcn.004e5f12
mov ecx, dword [ebp - 0x30]
mov edi, eax
inc ecx
mov dword [ebp - 0x34], edi
push ecx
push 0
push edi
call fcn.004e7970
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x30]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x4090e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
lea edx, [ebp - 0x34]
mov dword [ebp - 0x34], eax
call fcn.0040da80
add esp, 4
jmp 0x40913f
mov esi, edi
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4090f0
mov edx, dword [ebp - 0x18]
sub esi, ecx
mov ecx, dword [ebp - 0x1c]
mov eax, edx
sub eax, ecx
push esi
cmp esi, eax
ja 0x40912f
push dword [ebp - 0x34]
cmp edx, 0x10
lea edi, [ebp - 0x2c]
lea eax, [ecx + esi]
cmovae edi, dword [ebp - 0x2c]
add edi, ecx
mov dword [ebp - 0x1c], eax
push edi
call fcn.004e73f0
mov byte [edi + esi], 0
add esp, 0xc
mov edi, dword [ebp - 0x34]
jmp 0x40913c
push edi
push dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
push esi
call fcn.00404b10
mov esi, dword [ebp - 0x3c]
push edi
call fcn.004e54d1
add esp, 4
cmp dword [ebp - 0x30], 0
ja 0x409070
mov edi, dword [ebp - 0x38]
jmp 0x409185
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
lea edx, [ebp - 0x38]
mov dword [ebp - 0x38], eax
call fcn.0040d580
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str._in_WinHttpReceiveResponse
lea edx, [ebp - 0x38]
mov dword [ebp - 0x38], eax
call fcn.0040d800
add esp, 4
movups xmm0, xmmword [ebp - 0x2c]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [edi + 0x10], xmm0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e56df
mov esp, ebp
pop ebp
ret