Function at 0x408600
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cf50b
mov eax, dword fs:[0]
push eax
sub esp, 0x614
mov eax, dword [0x5035d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
cmp dword [ebx + 0x14], 0x10
mov dword [ebp - 0x5f4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x614], eax
mov eax, ebx
mov dword [ebx + 0x10], 0
jb 0x40865a
mov eax, dword [ebx]
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_6.1__Trident_5.0_
mov byte [eax], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x618], eax
test eax, eax
je 0x4088df
push 0x2710
push 0x2710
push 0x2710
push 0x2710
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
push 0
push dword [ebp + 0x1c]
push esi
push dword [ebp - 0x618]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x620], eax
test eax, eax
je 0x4088d3
mov ecx, dword [ebp + 0x20]
neg ecx
sbb ecx, ecx
and ecx, 0x800000
push ecx
push 0
push 0
push 0
push dword [ebp - 0x5f4]
push dword [ebp - 0x614]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x614], esi
test esi, esi
je 0x4088c5
push 0x21
xor eax, eax
mov dword [ebp - 0x600], 0
push str.Content_Type:application_json_r_n_r_n
lea ecx, [ebp - 0x610]
mov dword [ebp - 0x5fc], 7
mov word [ebp - 0x610], ax
call fcn.00408140
mov dword [ebp - 4], 0
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x408731
mov edi, dword [edi]
cmp dword [ebp - 0x5fc], 8
lea eax, [ebp - 0x610]
push 0
cmovae eax, dword [ebp - 0x610]
push ecx
push ecx
push edi
push dword [ebp - 0x600]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40879f
mov edx, dword [ebp - 0x5fc]
cmp edx, 8
jb 0x4088a1
mov ecx, dword [ebp - 0x610]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408897
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4088fe
jmp 0x408897
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40875c
mov dword [ebp - 0x5f8], 0
nop word [eax + eax]
push 0x5dd
lea eax, [ebp - 0x5f0]
push 0
push eax
call fcn.004a4df0
add esp, 0xc
lea eax, [ebp - 0x5f8]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40875c
cmp dword [ebp - 0x5f8], 0
je 0x40875c
lea eax, [ebp - 0x5f4]
mov dword [ebp - 0x5f4], 0
push eax
push 0x5dc
lea eax, [ebp - 0x5f0]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40875c
mov edx, dword [ebx + 0x14]
mov eax, edx
mov ecx, dword [ebx + 0x10]
sub eax, ecx
mov edi, dword [ebp - 0x5f4]
cmp edi, eax
ja 0x408868
lea eax, [ecx + edi]
mov dword [ebx + 0x10], eax
mov eax, ebx
cmp edx, 0x10
jb 0x408848
mov eax, dword [ebx]
lea esi, [eax + ecx]
push edi
lea eax, [ebp - 0x5f0]
push eax
push esi
call fcn.004a5560
mov byte [esi + edi], 0
add esp, 0xc
mov esi, dword [ebp - 0x614]
jmp 0x408885
push edi
lea eax, [ebp - 0x5f0]
mov byte [ebp - 0x61c], 0
push eax
push dword [ebp - 0x61c]
mov ecx, ebx
push edi
call fcn.00405ff0
cmp dword [ebp - 0x5f8], 0
ja 0x4087c0
jmp 0x40875c
push edx
push ecx
call fcn.004a1326
add esp, 8
xor eax, eax
mov dword [ebp - 0x5fc], 7
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x600], eax
mov word [ebp - 0x610], ax
call esi
jmp 0x4088cb
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x620]
call esi
push dword [ebp - 0x618]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a1365
mov esp, ebp
pop ebp
ret
call fcn.004a8d39
int3