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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4286e8
push eax
mov eax, 0x1ac4
mov dword fs:[0], esp
call fcn.0040c980
push ebx
push ebp
push edi
xor ebx, ebx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x165]
mov byte [esp + 0x164], bl
mov byte [esp + 0xe4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0xe5]
mov byte [esp + 0x64], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x12ac], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0x12ad]
mov byte [esp + 0xa88], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0xa89]
mov ebp, 4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x2c]
lea edx, [esp + 0x64]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x164]
lea ecx, [esp + 0xe4]
mov dword [esp + 0x38], eax
mov eax, 0x80
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], eax
lea eax, [esp + 0x12ac]
mov dword [esp + 0x1ad8], ebx
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x1ae4]
cmp eax, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], 0x3c
mov dword [esp + 0x3c], 0x100
mov dword [esp + 0x44], ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x58], 0x824
jne 0x4017eb
mov eax, 0x42a624
lea ecx, [esp + 0x28]
push esi
push ecx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x401a16
cmp dword [esp + 0x38], 3
jne 0x401a16
push ebx
push ebx
push ebx
push ebx
push str.down
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x401a16
push ebx
push ebx
lea edx, [esp + 0x70]
push 3
lea ecx, [esp + 0xf4]
push edx
mov edx, dword [esp + 0x54]
push ecx
lea ecx, [esp + 0x17c]
push edx
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edx, eax
cmp edx, ebx
mov dword [esp + 0x20], edx
je 0x401a16
mov eax, dword [esp + 0x5c]
lea esi, [esp + 0xa8c]
cmp eax, ebx
je 0x401887
mov edi, dword [esp + 0x58]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
mov eax, ecx
jmp 0x4018a3
mov edi, 0x434148
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
push 0x80200000
rep movsb byte es:[edi], byte [esi]
push ebx
push 0x438644
lea ecx, [esp + 0xa9c]
push str.HTTP_1.1
push ecx
push str.HEAD
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
push ebx
push ebx
mov esi, eax
push ebx
push ebx
push esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x401a16
lea edx, [esp + 0x1c]
push ebx
lea eax, [esp + 0x1c]
push edx
push eax
push 0x20000013
push esi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
call esi
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x401a1a
mov eax, dword [esp + 0x18]
cmp eax, 0xc8
je 0x401a16
cmp eax, 0x12e
jne 0x401a16
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0x269]
mov byte [esp + 0x268], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x28]
push ebx
lea edx, [esp + 0x26c]
push ecx
stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
push edx
push 0x21
push eax
mov dword [esp + 0x3c], 0x824
call esi
lea edi, [esp + 0x268]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
cmp ebp, 0xfffffffd
jbe 0x401992
call fcn.00418019
mov edi, dword [esp + 0x1af4]
mov ecx, dword [edi + 4]
cmp ecx, ebx
je 0x4019be
mov al, byte [ecx - 1]
cmp al, bl
je 0x4019be
cmp al, 0xff
je 0x4019be
cmp ebp, ebx
jne 0x4019e2
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, edi
call fcn.00403990
jmp 0x401a1a
cmp ebp, ebx
jne 0x4019cd
push 1
mov ecx, edi
call fcn.00403990
jmp 0x401a1a
mov eax, dword [edi + 0xc]
cmp eax, 0x1f
ja 0x4019d9
cmp eax, ebp
jae 0x4019ea
push 1
mov ecx, edi
call fcn.00403990
push ebp
mov ecx, edi
call fcn.00403bb0
mov edi, dword [edi + 4]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x268]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x1af4]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [eax + 8], ebp
mov eax, dword [eax + 4]
mov byte [eax + ebp], bl
jmp 0x401a1a
mov dword [esp + 0x10], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp eax, ebx
je 0x401a34
mov ecx, eax
push ecx
call esi
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x401a3f
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x401a4a
push eax
call esi
mov ecx, dword [esp + 0x1ae8]
pop esi
cmp ecx, ebx
je 0x401a72
mov al, byte [ecx - 1]
cmp al, bl
je 0x401a68
cmp al, 0xff
je 0x401a68
dec al
mov byte [ecx - 1], al
jmp 0x401a72
dec ecx
push ecx
call fcn.0041e125
add esp, 4
mov ecx, dword [esp + 0x1ad0]
mov eax, dword [esp + 0xc]
pop edi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1ad0
ret