Function at 0x405f16
Capabilities:
Check http status code
Connect to http server
Create http request
Get http content length
Send data
Send http request

Disassembly:
push 0x70
mov eax, 0x424fb0
call fcn.00411c5c
mov esi, dword [ebp + 8]
test esi, esi
je 0x405ff4
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x405f32
sub eax, edx
sar eax, 1
je 0x405ff4
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
test eax, eax
je 0x405ff4
lea edi, [ebp - 0x7c]
call fcn.00406b99
and dword [ebp - 4], 0
push esi
lea eax, [ebp - 0x28]
push eax
call fcn.0040417c
lea eax, [ebp - 0x28]
push eax
mov ebx, edi
mov byte [ebp - 4], 1
call fcn.00406c86
movzx edi, al
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.004054c6
xor esi, esi
cmp edi, esi
je 0x405fec
cmp dword [ebp - 0x48], 3
jne 0x405fec
mov eax, dword [ebp - 0x70]
add eax, 0xfffffff0
call fcn.00404893
lea edi, [eax + 0x10]
mov dword [ebp - 0x20], edi
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.004043c5
pop ecx
pop ecx
push esi
push esi
push esi
push esi
push 0x42a120
mov byte [ebp - 4], 3
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, esi
mov dword [ebp - 0x18], eax
jne 0x405ffc
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
lea ecx, [ebp - 0x7c]
call fcn.00406c13
xor al, al
call fcn.00411d34
ret
mov ebx, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
pop esi
push esi
lea ecx, [ebp - 0x14]
push ecx
push 2
push eax
mov dword [ebp - 0x14], 0xbb8
call ebx
mov edi, eax
test edi, edi
je 0x40623a
push esi
lea eax, [ebp - 0x14]
push eax
push 5
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x40623a
push esi
lea eax, [ebp - 0x14]
push eax
push 5
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x40623a
and dword [ebp - 0x14], 0
push esi
lea eax, [ebp - 0x14]
push eax
push 6
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x40623a
push esi
lea eax, [ebp - 0x14]
push eax
push 6
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x40623a
push dword [ebp + 8]
push dword [ebp + 0x10]
call fcn.00404247
push dword [ebp + 0x10]
lea ebx, [ebp - 0x7c]
call fcn.00406c86
movzx eax, al
xor esi, esi
cmp eax, esi
jne 0x4060b3
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004054c6
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
jmp 0x405fe7
xor esi, esi
cmp dword [ebp - 0x48], 3
jne 0x40609b
lea eax, [ebp - 0x70]
lea edi, [ebp - 0x20]
call fcn.00404206
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x64]
call fcn.004043c5
pop ecx
pop ecx
lea edi, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.00404206
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.004054c6
cmp word [ebp - 0x44], si
movzx eax, word [ebp - 0x44]
jne 0x4060fe
push 0x50
pop eax
push esi
push esi
push 3
push esi
push esi
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call dword [sym.imp.WININET.dll_InternetConnectW]
cmp eax, esi
mov dword [ebp - 0x28], eax
je 0x4061fc
push esi
push 0x44200000
push esi
push esi
push esi
push dword [ebp - 0x1c]
push str.HEAD
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
cmp ebx, esi
mov dword [ebp + 8], ebx
je 0x406200
push esi
push esi
push esi
push esi
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov edi, eax
cmp edi, esi
je 0x40621e
push esi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0x20000013
push ebx
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x34], 4
call ebx
mov edi, eax
cmp edi, esi
je 0x40621e
mov eax, dword [ebp - 0x2c]
cmp eax, 0xc8
je 0x406199
cmp eax, 0x130
je 0x406199
cmp eax, 0x12e
jne 0x406200
cmp eax, 0x12e
push esi
jne 0x406204
lea eax, [ebp - 0x24]
push eax
push esi
push 0x21
push dword [ebp + 8]
mov dword [ebp - 0x24], esi
call ebx
push esi
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x24]
call fcn.004058ab
push eax
push 0x21
push dword [ebp + 8]
call ebx
mov eax, dword [esi]
call fcn.0040534a
mov edx, esi
call fcn.004054f9
push dword [ebp + 8]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push dword [ebp - 0x28]
call edi
push esi
lea ebx, [ebp - 0x7c]
call fcn.00406c86
test al, al
jne 0x4060b1
jmp 0x40609b
xor edi, edi
jmp 0x40622c
xor edi, edi
jmp 0x40621e
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x38], 4
push 0x20000005
push dword [ebp + 8]
call ebx
mov edi, eax
cmp dword [ebp + 8], esi
je 0x40622c
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x28], esi
je 0x40623a
push dword [ebp - 0x28]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x18]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004054c6
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.004054c6
lea ecx, [ebp - 0x7c]
call fcn.00406c13
test edi, edi
setne al
jmp 0x405ff6