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

Disassembly:
push 0xffffffffffffffff
push 0x4211f8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push ebp
push esi
push edi
mov eax, dword [0x428040]
xor eax, esp
push eax
lea eax, [esp + 0x7c]
mov dword fs:[0], eax
mov edi, dword [esp + 0x8c]
xor ebx, ebx
cmp edi, ebx
je 0x4043f1
mov eax, edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4041f0
sub eax, edx
sar eax, 1
je 0x4043f1
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
test eax, eax
je 0x4043f1
lea esi, [esp + 0x34]
call fcn.00404bf0
lea eax, [esp + 0x20]
push eax
mov ecx, edi
mov dword [esp + 0x88], ebx
call fcn.00401fe0
lea ecx, [esp + 0x20]
push ecx
mov edx, esi
push edx
mov byte [esp + 0x8c], 1
call fcn.00404e20
movzx esi, al
mov byte [esp + 0x84], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40426f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, ebx
je 0x4043e8
cmp dword [esp + 0x68], 3
jne 0x4043e8
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
call fcn.00402780
add eax, 0x10
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x1c]
push edx
lea ebx, [esp + 0x54]
mov byte [esp + 0x8c], 2
call fcn.00404a60
add esp, 8
push 0
push 0
push 0
push 0
push 0x4241a4
mov byte [esp + 0x98], 3
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x20], ebp
jne 0x4042ef
lea eax, [esp + 0x18]
call fcn.004020f0
lea eax, [esp + 0x1c]
call fcn.004020f0
jmp 0x4043e8
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [esp + 0x18]
push eax
push 2
push ebp
mov dword [esp + 0x24], 0xbb8
call edi
mov esi, eax
test esi, esi
je 0x404656
push 4
lea ecx, [esp + 0x18]
push ecx
push 5
push ebp
call edi
mov esi, eax
test esi, esi
je 0x404656
push 4
lea edx, [esp + 0x18]
push edx
push 5
push ebp
call edi
mov esi, eax
test esi, esi
je 0x404656
push 4
lea eax, [esp + 0x18]
push eax
push 6
push ebp
mov dword [esp + 0x24], 0
call edi
mov esi, eax
test esi, esi
je 0x404656
push 4
lea ecx, [esp + 0x18]
push ecx
push 6
push ebp
call edi
mov esi, eax
test esi, esi
je 0x404656
mov edx, dword [esp + 0x8c]
mov edi, dword [esp + 0x94]
call fcn.00402110
push edi
lea edx, [esp + 0x38]
push edx
call fcn.00404e20
movzx eax, al
test eax, eax
jne 0x404414
mov byte [esp + 0x84], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4043c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x84], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4043e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x34]
call fcn.00404cf0
xor al, al
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret
mov ebp, dword [esp + 0x20]
cmp dword [esp + 0x68], 3
jne 0x404398
lea eax, [esp + 0x40]
lea edi, [esp + 0x1c]
call fcn.00402560
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ebx, [esp + 0x54]
call fcn.00404a60
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x84], 4
call fcn.00402560
mov byte [esp + 0x84], 3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40447b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov cx, word [esp + 0x6c]
test cx, cx
movzx eax, cx
jne 0x40448d
mov eax, 0x50
mov ecx, dword [esp + 0x1c]
push 0
push 0
push 3
push 0
push 0
push eax
push ecx
push ebp
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
test ebx, ebx
je 0x404609
mov edx, dword [esp + 0x18]
push 0
push 0x44200000
push 0
push 0
push 0
push edx
push str.HEAD
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
test edi, edi
je 0x40460d
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov esi, eax
test esi, esi
je 0x404640
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0x20000013
mov ebp, 4
push edi
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], ebp
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov esi, eax
test esi, esi
je 0x40463c
mov eax, dword [esp + 0x24]
cmp eax, 0xc8
je 0x404542
cmp eax, 0x130
je 0x404542
cmp eax, 0x12e
je 0x40454d
xor esi, esi
jmp 0x40463c
cmp eax, 0x12e
jne 0x40461b
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0
lea edx, [esp + 0x90]
push edx
push 0
push 0x21
push edi
mov dword [esp + 0xa0], 0
call esi
mov ebp, dword [esp + 0x94]
mov eax, dword [ebp]
mov ecx, dword [esp + 0x8c]
sub eax, 0x10
mov edx, 1
sub edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, ecx
or eax, edx
jge 0x40459b
mov eax, ebp
call fcn.00403870
mov eax, dword [ebp]
push 0
lea ecx, [esp + 0x90]
push ecx
push eax
push 0x21
push edi
call esi
mov ecx, dword [ebp]
test ecx, ecx
jne 0x4045b9
xor eax, eax
jmp 0x4045d1
mov eax, ecx
lea esi, [eax + 2]
mov edi, edi
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4045c0
sub eax, esi
sar eax, 1
js 0x404611
cmp eax, dword [ecx - 8]
jg 0x404611
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ecx - 0xc], eax
mov edx, dword [ebp]
push edi
mov word [edx + eax*2], 0
call esi
push ebx
call esi
push ebp
lea eax, [esp + 0x38]
push eax
call fcn.00404e20
movzx eax, al
test eax, eax
jne 0x404410
jmp 0x404398
xor esi, esi
jmp 0x40464b
xor esi, esi
jmp 0x404640
push 0x80070057
call fcn.00403850
mov edx, dword [esp + 0x90]
push 0
lea ecx, [esp + 0x34]
push ecx
push edx
push 0x20000005
push edi
mov dword [esp + 0x44], ebp
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov esi, eax
mov ebp, dword [esp + 0x20]
test edi, edi
je 0x40464b
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x404656
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test esi, esi
mov byte [esp + 0x84], 2
mov eax, dword [esp + 0x18]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40468a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x84], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4046b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x34]
call fcn.00404cf0
mov al, bl
mov ecx, dword [esp + 0x7c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret