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

Disassembly:
push 0xb4
mov eax, 0x40dea9
call fcn.0040dcf7
mov ebx, ecx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x78], ebx
and dword [ebp - 0x50], 0
mov dword [ebp - 4], 5
lea eax, [ebp + 0x38]
cmp dword [ebp + 0x4c], 0x10
cmovae eax, dword [ebp + 0x38]
mov esi, eax
mov dword [ebp - 0x58], eax
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401261
sub esi, ecx
lea edx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00401166
lea edx, [ebp + 0x20]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2c]
call fcn.00401166
mov byte [ebp - 4], 7
mov ecx, ebx
mov dword [esp], 0x412d70
call fcn.00401696
and dword [ebp - 0x48], 0
lea edx, [ebp + 0x50]
and dword [ebp - 0x14], 0
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x50], 1
call fcn.004010ee
cmp dword [eax + 0x14], 8
jb 0x4012bc
mov eax, dword [eax]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x5c], edi
call fcn.004015a6
mov eax, 0x493e0
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test edi, edi
je 0x4014e1
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
push 0
cmovae eax, dword [ebp - 0x44]
push 0x50
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x54], eax
mov eax, 0x493e0
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp dword [ebp - 0x54], 0
je 0x4014da
lea edx, [ebp + 0x68]
lea ecx, [ebp - 0xa8]
call fcn.004010ee
mov ecx, eax
cmp dword [ecx + 0x14], 8
jb 0x40133d
mov ecx, dword [ecx]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
xor edx, edx
push edx
push edx
push edx
push edx
push eax
push ecx
push dword [ebp - 0x54]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0x4c], eax
call fcn.004015a6
mov eax, 0x493e0
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4014d1
push 0
push esi
push esi
push dword [ebp - 0x58]
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded_r_n
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov esi, eax
mov eax, 0x493e0
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test esi, esi
je 0x4014c7
mov eax, 0x493e0
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov esi, dword [ebp - 0x4c]
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4014c7
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x4013df
mov eax, dword [ebx]
and dword [ebx + 0x10], 0
mov byte [eax], 0
and dword [ebp - 0x48], 0
lea eax, [ebp - 0x48]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov eax, dword [ebp - 0x48]
inc eax
push eax
call fcn.00401b5f
mov edi, eax
mov eax, dword [ebp - 0x48]
pop ecx
inc eax
mov dword [ebp - 0x58], edi
push eax
push 0
push edi
call fcn.00402f80
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x48]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4014b3
push edi
lea ecx, [ebp - 0xc0]
call fcn.00401696
mov byte [ebp - 4], 8
mov ecx, ebx
cmp dword [ebx + 0x14], 0x10
jb 0x401446
mov ecx, dword [ebx]
push dword [ebx + 0x10]
push ecx
push ecx
mov ecx, eax
call fcn.004018c0
push eax
lea ecx, [ebp - 0x74]
call fcn.00401663
or dword [ebp - 0x50], 2
lea eax, [ebp - 0x74]
cmp ebx, eax
je 0x40149c
mov edx, dword [ebx + 0x14]
cmp edx, 0x10
jb 0x401476
mov ecx, dword [ebx]
inc edx
call fcn.00401860
push 0xf
pop edx
xor eax, eax
mov dword [ebx + 0x14], edx
push 6
pop ecx
lea esi, [ebp - 0x74]
mov dword [ebx + 0x10], eax
mov edi, ebx
mov byte [ebx], al
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x58]
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
mov byte [ebp - 0x74], al
lea ecx, [ebp - 0x74]
call fcn.00401640
lea ecx, [ebp - 0xc0]
mov byte [ebp - 4], 7
call fcn.00401640
push edi
call fcn.00401b1c
cmp dword [ebp - 0x48], 0
pop ecx
ja 0x4013e6
mov edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x54]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x2c]
call fcn.004015a6
lea ecx, [ebp - 0x44]
call fcn.004015a6
lea ecx, [ebp + 8]
call fcn.00401640
lea ecx, [ebp + 0x20]
call fcn.00401640
lea ecx, [ebp + 0x38]
call fcn.00401640
lea ecx, [ebp + 0x50]
call fcn.00401640
lea ecx, [ebp + 0x68]
call fcn.00401640
mov eax, ebx
call fcn.0040dcb5
ret