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

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push ebp
push ebp
push ebp
push ebp
mov esi, eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x30], ebp
xor edi, edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
push 0x3c
lea eax, [esp + 0x2c]
push ebp
push eax
mov dword [esp + 0x30], ebx
call fcn.0042f230
add esp, 0xc
or eax, 0xffffffff
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], eax
mov eax, esi
mov dword [esp + 0x28], 0x3c
lea ecx, [eax + 2]
mov edi, edi
mov dx, word [eax]
add eax, 2
cmp dx, bp
jne 0x40e560
sub eax, ecx
lea ecx, [esp + 0x28]
push ecx
push ebp
sar eax, 1
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
mov eax, dword [esp + 0x3c]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042a027
mov esi, eax
mov eax, dword [esp + 0x40]
lea ecx, [eax + eax + 2]
push ecx
push ebp
push esi
call fcn.0042f230
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
lea eax, [edx + edx]
push eax
push ecx
push esi
call fcn.00431fb0
add esp, 0x1c
cmp ebx, ebp
je 0x40e5f5
mov edx, dword [esp + 0x40]
push ebp
push edx
push esi
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [esp + 0x1c], eax
cmp eax, ebp
je 0x40e5f5
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x1c]
push ebp
push ebp
push ebp
push ebp
push eax
push 0x44ca5c
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov edx, dword [esp + 0x6c]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 4
lea eax, [esp + 0x1c]
push eax
push 3
push edi
mov dword [esp + 0x28], edx
call ebx
push 4
lea ecx, [esp + 0x1c]
push ecx
push 5
push edi
call ebx
push 4
lea edx, [esp + 0x1c]
push edx
push 6
push edi
call ebx
cmp edi, ebp
je 0x40e64c
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [esp + 0x14], eax
cmp eax, ebp
je 0x40e64c
push ebp
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [esp + 0x14], eax
push esi
call fcn.0042b8d3
add esp, 4
cmp dword [esp + 0x14], ebp
je 0x40e795
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push ebp
lea eax, [esp + 0x14]
push eax
push ebp
push ebp
push 0x13
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40e6fc
mov eax, dword [esp + 0x10]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042a027
add esp, 4
push ebp
mov ebx, eax
lea eax, [esp + 0x14]
push eax
push ebx
push ebp
push 0x13
push edi
call esi
mov dword [esp + 0x14], eax
cmp eax, ebp
je 0x40e6f3
mov ecx, 0x44d1fc
mov eax, ebx
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e6e6
cmp dx, bp
je 0x40e6e2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e6e6
add eax, 4
add ecx, 4
cmp dx, bp
jne 0x40e6c0
xor eax, eax
jmp 0x40e6eb
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
je 0x40e6f3
mov dword [esp + 0x14], ebp
push ebx
call fcn.0042b8d3
add esp, 4
cmp dword [esp + 0x14], ebp
je 0x40e795
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
lea esp, [esp]
lea ecx, [esp + 0x10]
push ecx
push edi
mov dword [esp + 0x18], ebp
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x40e728
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x10]
inc edx
push edx
call fcn.0042a027
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x40e78d
mov eax, dword [esp + 0x10]
inc eax
push eax
push ebp
push esi
call fcn.0042f230
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push edx
push esi
push edi
call ebx
test eax, eax
jne 0x40e768
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
jmp 0x40e77c
mov ecx, dword [esp + 0x68]
cmp ecx, ebp
je 0x40e77c
mov edx, dword [esp + 0x20]
mov eax, dword [ecx]
mov eax, dword [eax]
push edx
push esi
call eax
push esi
call fcn.0042b8d3
add esp, 4
cmp dword [esp + 0x10], ebp
ja 0x40e710
jmp 0x40e795
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp edi, ebp
je 0x40e7a2
push edi
call esi
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x40e7ad
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x40e7b8
push eax
call esi
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret