Function at 0x40e280
Capabilities:
Check http status code
Connect to http server
Parse url
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x104c
call fcn.0045f290
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
cmp dword [esi], 0
je 0x40e43e
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x3c
lea eax, [ebp - 0x104c]
push 0
push eax
call fcn.0044e8d0
add esp, 0xc
mov dword [ebp - 0x104c], 0x3c
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x1038], 1
mov dword [ebp - 0x101c], 1
jb 0x40e2ff
mov edi, dword [edi]
lea eax, [ebp - 0x104c]
push eax
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x40e43e
mov edi, dword [ebp - 0x1038]
cmp edi, 0x400
jae 0x40e43e
cmp dword [ebp - 0x101c], 0x400
jae 0x40e43e
xor eax, eax
cmp dword [esi], eax
je 0x40e440
push 0x7fe
push eax
mov word [ebp - 0x1008], ax
lea eax, [ebp - 0x1006]
push eax
call fcn.0044e8d0
add esp, 0xc
lea eax, [ebp - 0x1008]
push edi
push dword [ebp - 0x103c]
push 0x400
push eax
call fcn.0044b6fa
mov eax, dword [ebp - 0x1038]
add esp, 0x10
add eax, eax
cmp eax, 0x800
jae 0x40e5a2
xor ecx, ecx
mov word [ebp + eax - 0x1008], cx
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x808], ax
lea eax, [ebp - 0x806]
push eax
call fcn.0044e8d0
add esp, 0xc
lea eax, [ebp - 0x808]
push dword [ebp - 0x101c]
push dword [ebp - 0x1020]
push 0x400
push eax
call fcn.0044b6fa
mov eax, dword [ebp - 0x101c]
add esp, 0x10
add eax, eax
cmp eax, 0x800
jae 0x40e5a2
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
xor ecx, ecx
mov word [ebp + eax - 0x808], cx
lea eax, [esi + 8]
push ecx
push eax
call edi
push esi
push 0
push 3
push 0
push 0
push 0
lea eax, [ebp - 0x1008]
push eax
push dword [esi]
call dword [sym.imp.WININET.dll_InternetConnectW]
test eax, eax
jne 0x40e453
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40e437
mov ecx, esi
call fcn.0040e220
test eax, eax
je 0x40e45a
mov ecx, esi
call fcn.0040e5b0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret 8
push eax
lea eax, [esi + 8]
push eax
call edi
push esi
push 0x4000000
push 0
push 0
push str.HTTP_1.0
lea eax, [ebp - 0x808]
push eax
mov eax, dword [esi + 8]
push 0x472b68
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
test edi, edi
jne 0x40e49f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40e437
mov ecx, esi
call fcn.0040e220
test eax, eax
jne 0x40e437
jmp 0x40e4aa
push edi
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test ebx, ebx
je 0x40e4c3
cmp word [ebx], 0
je 0x40e4c3
push 0xa0000000
push 0xffffffffffffffff
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 4]
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x40e502
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40e437
mov ecx, esi
call fcn.0040e220
test eax, eax
jne 0x40e437
push 0
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 4
push eax
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x100c], 0
push eax
mov eax, dword [esi + 4]
push 0x20000013
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40e437
push dword [ebp - 0x100c]
push str.HttpQueryInfo__return_StatusCode_d
push 0xca
push str.HttpHttpWinet.cpp
call fcn.0040a560
mov eax, dword [ebp - 0x100c]
add esp, 0x10
cmp eax, 0xc8
je 0x40e58a
cmp eax, 0xce
je 0x40e58a
push str.DownloadFile_error4
push 0xca
push str.HttpHttpWinet.cpp
call fcn.0040a560
add esp, 0xc
jmp 0x40e437
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044a781
mov esp, ebp
pop ebp
ret 8
call fcn.0044c5c0
int3