Function at 0x401630
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.MyAgent_1.0
call sub.WINHTTP.dll_WinHttpOpen
sub esp, 0x14
test eax, eax
je 0x401899
mov edi, dword [edi]
mov esi, eax
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp], edi
lea ecx, [ebp - 0x28]
add eax, edi
mov dword [ebp - 0x30], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 4], eax
call fcn.004015a0
mov eax, dword [ebp - 0x30]
sub esp, 8
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x50
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.WINHTTP.dll_WinHttpConnect
mov edi, eax
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x28]
sub esp, 0x10
cmp eax, edx
je 0x4016dc
mov edx, dword [ebp - 0x28]
mov dword [esp], eax
lea edx, [edx + edx + 2]
mov dword [esp + 4], edx
call fcn.0042cbb0
test edi, edi
je 0x40188e
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov dword [esp], ebx
lea ecx, [ebp - 0x28]
add eax, ebx
mov dword [ebp - 0x30], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 4], eax
call fcn.004015a0
mov eax, dword [ebp - 0x30]
sub esp, 8
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x430086
mov dword [esp], edi
call sub.WINHTTP.dll_WinHttpOpenRequest
mov ebx, eax
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x28]
sub esp, 0x1c
cmp eax, edx
je 0x40175f
mov edx, dword [ebp - 0x28]
mov dword [esp], eax
lea edx, [edx + edx + 2]
mov dword [esp + 4], edx
call fcn.0042cbb0
test ebx, ebx
je 0x401883
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.WINHTTP.dll_WinHttpSendRequest
sub esp, 0x1c
test eax, eax
je 0x401878
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.WINHTTP.dll_WinHttpReceiveResponse
sub esp, 8
test eax, eax
je 0x401878
lea eax, [ebp - 0x30]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000005
mov dword [esp], ebx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 4
call sub.WINHTTP.dll_WinHttpQueryHeaders
mov edx, dword [ebp - 0x34]
sub esp, 0x18
test edx, edx
je 0x401878
mov dword [esp], edx
mov dword [ebp - 0x40], edx
call sub.msvcrt.dll_malloc
mov edx, dword [ebp - 0x40]
test eax, eax
mov dword [ebp - 0x3c], eax
je 0x401845
lea eax, [ebp - 0x38]
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.WINHTTP.dll_WinHttpReadData
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x38]
sub esp, 0x10
mov dword [eax], edx
mov dword [esp], ebx
call sub.WINHTTP.dll_WinHttpCloseHandle
sub esp, 4
mov dword [esp], edi
call sub.WINHTTP.dll_WinHttpCloseHandle
sub esp, 4
mov dword [esp], esi
call sub.WINHTTP.dll_WinHttpCloseHandle
mov eax, dword [ebp - 0x3c]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp], ebx
call sub.WINHTTP.dll_WinHttpCloseHandle
sub esp, 4
mov dword [esp], edi
call sub.WINHTTP.dll_WinHttpCloseHandle
sub esp, 4
mov dword [esp], esi
call sub.WINHTTP.dll_WinHttpCloseHandle
sub esp, 4
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x3c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8