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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e4dad
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x49c
mov dword [ebp - 0x10], 0
mov ecx, 0x51c276
call fcn.004c108d
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x6c], 0
lea ecx, [ebp - 0x50]
call fcn.00403690
mov dword [ebp - 4], 0
push 0
push 0
push 0
push 0
push str.WinHTTP_Example_1.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40a0bb
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
call fcn.004035c0
mov ecx, dword [ebp - 0x10]
or ecx, 1
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
jmp 0x40a438
push 0x3c
push 0
lea edx, [ebp - 0xa8]
push edx
call fcn.004c4400
add esp, 0xc
push 0x3c
push 0
lea eax, [ebp - 0xa8]
push eax
call fcn.004c4400
add esp, 0xc
mov dword [ebp - 0xa8], 0x3c
mov dword [ebp - 0xa0], 0xffffffff
mov dword [ebp - 0x94], 0xffffffff
mov dword [ebp - 0x78], 0xffffffff
mov dword [ebp - 0x70], 0xffffffff
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
add edx, 2
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x20]
mov cx, word [eax]
mov word [ebp - 0x26], cx
add dword [ebp - 0x20], 2
cmp word [ebp - 0x26], 0
jne 0x40a11c
mov edx, dword [ebp - 0x20]
sub edx, dword [ebp - 0x54]
sar edx, 1
mov dword [ebp - 0x58], edx
lea eax, [ebp - 0xa8]
push eax
push 0
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x40a184
push 0x4eb8a3
mov ecx, dword [ebp + 8]
call fcn.00403610
mov eax, dword [ebp - 0x10]
or eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
jmp 0x40a438
mov ecx, dword [ebp - 0x98]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00407470
mov byte [ebp - 4], 1
push 0
push 0x4eb960
lea ecx, [ebp - 0x18]
call fcn.00409610
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
je 0x40a1e4
mov edx, dword [ebp - 0x30]
push edx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040a860
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x60], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x60]
push edx
lea ecx, [ebp - 0x18]
call fcn.00407fd0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.00407d20
push 0
movzx eax, word [ebp - 0x90]
push eax
lea ecx, [ebp - 0x18]
call fcn.00408170
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x40a243
push 0x4eb8c2
mov ecx, dword [ebp + 8]
call fcn.00403610
mov edx, dword [ebp - 0x10]
or edx, 1
mov dword [ebp - 0x10], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00407d20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
jmp 0x40a438
mov dword [ebp - 0x34], 0
movzx eax, word [ebp - 0x90]
cmp eax, 0x1bb
jne 0x40a25f
mov dword [ebp - 0x34], 0x800000
mov ecx, dword [ebp - 0x34]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0x7c]
push edx
push 0x4eb964
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40a2c7
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp + 8]
call fcn.004035c0
mov eax, dword [ebp - 0x10]
or eax, 1
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00407d20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
jmp 0x40a438
mov dword [ebp - 0x68], 0x3300
push 4
lea ecx, [ebp - 0x68]
push ecx
push 0x1f
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40a34b
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
call fcn.004035c0
mov ecx, dword [ebp - 0x10]
or ecx, 1
mov dword [ebp - 0x10], ecx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00407d20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
jmp 0x40a438
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40a3ac
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp + 8]
call fcn.004035c0
mov eax, dword [ebp - 0x10]
or eax, 1
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00407d20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
jmp 0x40a438
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x2c]
push ecx
push 0x400
lea edx, [ebp - 0x4a8]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40a3d8
jmp 0x40a3f1
mov ecx, dword [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x4a8]
push edx
lea ecx, [ebp - 0x50]
call fcn.0040fea0
cmp dword [ebp - 0x2c], 0
ja 0x40a3b3
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp + 8]
call fcn.004035c0
mov eax, dword [ebp - 0x10]
or eax, 1
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00407d20
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.004038c0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret