Function at 0x405693
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, 0x423b43
call fcn.004109ec
mov esi, dword [ebp + 8]
test esi, esi
je 0x405771
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4056af
sub eax, edx
sar eax, 1
je 0x405771
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
test eax, eax
je 0x405771
lea edi, [ebp - 0x7c]
call fcn.00406304
and dword [ebp - 4], 0
push esi
lea eax, [ebp - 0x28]
push eax
call fcn.0040387b
lea eax, [ebp - 0x28]
push eax
mov ebx, edi
mov byte [ebp - 4], 1
call fcn.0040640a
movzx edi, al
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.00404c04
xor esi, esi
cmp edi, esi
je 0x405769
cmp dword [ebp - 0x48], 3
jne 0x405769
mov eax, dword [ebp - 0x70]
add eax, 0xfffffff0
call fcn.0040402e
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.00403b0f
pop ecx
pop ecx
push esi
push esi
push esi
push esi
push 0x4291f8
mov byte [ebp - 4], 3
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, esi
mov dword [ebp - 0x18], eax
jne 0x405779
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.00404c04
lea eax, [edi - 0x10]
call fcn.00404c04
lea ecx, [ebp - 0x7c]
call fcn.00406397
xor al, al
call fcn.00410ac4
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 0x4059b7
push esi
lea eax, [ebp - 0x14]
push eax
push 5
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x4059b7
push esi
lea eax, [ebp - 0x14]
push eax
push 5
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x4059b7
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 0x4059b7
push esi
lea eax, [ebp - 0x14]
push eax
push 6
push dword [ebp - 0x18]
call ebx
mov edi, eax
test edi, edi
je 0x4059b7
push dword [ebp + 8]
push dword [ebp + 0x10]
call fcn.00403933
push dword [ebp + 0x10]
lea ebx, [ebp - 0x7c]
call fcn.0040640a
movzx eax, al
xor esi, esi
cmp eax, esi
jne 0x405830
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.00404c04
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
jmp 0x405764
xor esi, esi
cmp dword [ebp - 0x48], 3
jne 0x405818
lea eax, [ebp - 0x70]
lea edi, [ebp - 0x20]
call fcn.004038f2
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x64]
call fcn.00403b0f
pop ecx
pop ecx
lea edi, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.004038f2
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.00404c04
cmp word [ebp - 0x44], si
movzx eax, word [ebp - 0x44]
jne 0x40587b
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 0x405979
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 0x40597d
push esi
push esi
push esi
push esi
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov edi, eax
cmp edi, esi
je 0x40599b
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 0x40599b
mov eax, dword [ebp - 0x2c]
cmp eax, 0xc8
je 0x405916
cmp eax, 0x130
je 0x405916
cmp eax, 0x12e
jne 0x40597d
cmp eax, 0x12e
push esi
jne 0x405981
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.00404fbb
push eax
push 0x21
push dword [ebp + 8]
call ebx
mov eax, dword [esi]
call fcn.00404fa4
mov edx, esi
call fcn.00404c37
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.0040640a
test al, al
jne 0x40582e
jmp 0x405818
xor edi, edi
jmp 0x4059a9
xor edi, edi
jmp 0x40599b
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 0x4059a9
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x28], esi
je 0x4059b7
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.00404c04
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.00404c04
lea ecx, [ebp - 0x7c]
call fcn.00406397
test edi, edi
setne al
jmp 0x405773