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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5631be
mov eax, dword fs:[0]
push eax
mov eax, 0x1001c
call fcn.00534e90
mov eax, dword [0x5cdfb0]
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 edi, ecx
mov dword [ebp - 0x1001c], edi
mov dword [ebp - 4], 1
lea edx, [ebp + 0x20]
cmp dword [ebp + 0x34], 8
lea eax, [ebp + 8]
cmovae edx, dword [ebp + 0x20]
cmp dword [ebp + 0x1c], 8
push edx
cmovae eax, dword [ebp + 8]
push eax
push str.makeGETRequest_http:___s_s
call fcn.0040cfa0
add esp, 0xc
lea eax, [ebp - 0x10010]
xor ebx, ebx
mov esi, ebx
mov dword [ebp - 0x10014], ebx
mov dword [ebp - 0x10018], ebx
push 0x10000
push ebx
push eax
call fcn.00532330
add esp, 0xc
push ebx
push ebx
push ebx
push ebx
push 0x5a952c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
test ecx, ecx
jne 0x40d23d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Error__u_in_WinHttpOpen._n
mov esi, eax
call fcn.0040ce6c
pop ecx
pop ecx
jmp 0x40d38c
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
push ebx
cmovae eax, dword [ebp + 8]
push 0x50
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
test ecx, ecx
jne 0x40d267
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Error__u_in_WinHttpConnect._n
jmp 0x40d22f
cmp dword [ebp + 0x34], 8
lea eax, [ebp + 0x20]
push ebx
cmovae eax, dword [ebp + 0x20]
push ebx
push ebx
push ebx
push eax
push 0x5a77c0
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
test ebx, ebx
jne 0x40d297
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Error__u_in_WinHttpOpenRequest._n
jmp 0x40d22f
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
je 0x40d2be
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
push ebx
push str.Error__u_in_WinHttpSendRequest._n
jmp 0x40d22f
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov ecx, dword [ebp - 0x10014]
xor edx, edx
test eax, eax
lea eax, [ebp - 0x10014]
push eax
cmovne ecx, edx
push ebx
mov dword [ebp - 0x10014], ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x40d306
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.0040ce6c
pop ecx
pop ecx
jmp 0x40d38a
mov eax, dword [ebp - 0x10014]
xor edi, edi
test eax, eax
je 0x40d384
lea ecx, [ebp - 0x10018]
push ecx
push eax
lea eax, [ebp - 0x10010]
add eax, edi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40d354
add edi, dword [ebp - 0x10014]
lea eax, [ebp - 0x10014]
and dword [ebp - 0x10014], esi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov eax, dword [ebp - 0x10014]
test eax, eax
jne 0x40d312
jmp 0x40d369
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__u_in_WinHttpReadData._n
call fcn.0040ce6c
pop ecx
pop ecx
test edi, edi
je 0x40d384
push edi
mov edi, dword [ebp - 0x1001c]
lea eax, [ebp - 0x10010]
push eax
mov ecx, edi
call fcn.004022f1
jmp 0x40d38a
mov edi, dword [ebp - 0x1001c]
xor ebx, ebx
cmp dword [edi + 0x14], 0x10
jb 0x40d394
mov edi, dword [edi]
push esi
push edi
push str.makeGETRequest_returned__s_with_error__d
call fcn.0040ce6c
sub esp, 0xc
mov ecx, esp
mov dword [ebp - 0x1001c], esp
push 0x5a76f4
call fcn.00402387
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0x10024], esp
push 0x5a77de
call fcn.00402387
sub esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
push str.makeGETRequest
call fcn.00402387
xor dl, dl
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.0040516a
add esp, 0x48
lea ecx, [ebp + 8]
push ebx
push 1
call fcn.004034f0
push ebx
push 1
lea ecx, [ebp + 0x20]
call fcn.004034f0
mov eax, esi
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.0052f025
mov esp, ebp
pop ebp
ret