Function at 0x4015c0
Capabilities:
Check http status code
Connect to http server
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xeac
mov eax, dword [0x4121f4]
xor eax, esp
mov dword [esp + 0xea8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 4], 0
mov ebx, ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], 0xa4000000
mov dword [esp + 0x10], str.POST
jne 0x401608
mov dword [esp + 0x10], 0x40fbe8
mov ecx, dword [edi]
lea esi, [esp + 0x30]
call fcn.00401880
cmp dword [esp + 0x30], 1
mov esi, 0xa4800000
je 0x401623
mov esi, dword [esp + 0x14]
cmp dword [ebx + 0x244], 2
je 0x401653
mov eax, 0x232f
mov dword [ebx + 0x248], eax
mov dword [edi + 0x18], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xea8]
xor ecx, esp
call fcn.004025e6
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x34]
push 1
push esi
push eax
mov eax, dword [esp + 0xa70]
mov dword [ebx + 0x244], 4
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0x10]
push ecx
push edx
mov edx, dword [ebx + 0x250]
push eax
lea ecx, [esp + 0x50]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edx, dword [esp + 0x10]
push 1
push esi
push 0x4131c0
push 0
push 0
lea ecx, [esp + 0x254]
push ecx
push edx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
jne 0x4016c6
mov eax, 0x2328
mov dword [ebx + 0x248], eax
mov dword [edi + 0x18], eax
xor eax, eax
jmp 0x401850
mov eax, str.Content_Type:_application_x_www_form_urlencoded
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4016d0
mov ecx, dword [edi + 0xc]
push ecx
sub eax, edx
mov edx, dword [edi + 8]
push edx
sar eax, 1
push eax
push str.Content_Type:_application_x_www_form_urlencoded
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x40170d
mov eax, 0x270f
mov dword [ebx + 0x248], eax
mov dword [edi + 0x18], eax
xor eax, eax
jmp 0x401850
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0x20000013
push esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4016f8
cmp dword [esp + 0x1c], 0xc8
jne 0x4016f8
push 0x3e
lea edx, [esp + 0xa6e]
push 0
push edx
mov word [esp + 0xa74], 0
call fcn.00406a80
add esp, 0xc
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0xa70]
push ecx
push 5
push esi
mov dword [esp + 0x40], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x40179a
mov eax, 0x232c
mov dword [ebx + 0x248], eax
mov dword [edi + 0x18], eax
xor eax, eax
jmp 0x401850
lea edx, [esp + 0xa68]
push edx
call fcn.0040261f
add eax, 1
push eax
mov dword [esp + 0x1c], eax
call fcn.0040238e
mov ecx, dword [esp + 0x1c]
push ecx
push 0
push eax
mov dword [esp + 0x3c], eax
call fcn.00406a80
add esp, 0x14
mov dword [esp + 0x18], 0x400
jmp 0x4017e4
mov esi, dword [esp + 0x10]
push 0x401
lea edx, [esp + 0xaac]
push 0
push edx
call fcn.00406a80
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x400
lea ecx, [esp + 0xab0]
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edx, dword [esp + 0x18]
mov ecx, dword [edi + 0xc]
mov esi, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0xaac]
push eax
sub ecx, esi
push ecx
add edx, esi
push edx
call fcn.00402c43
mov eax, dword [esp + 0x28]
add esi, eax
add esp, 0x10
cmp eax, 0x400
mov dword [esp + 0x20], esi
jae 0x4017e0
mov eax, 1
mov ecx, dword [esp + 0xeb4]
pop edi
pop esi
mov dword [ebx + 0x244], 2
pop ebx
xor ecx, esp
call fcn.004025e6
mov esp, ebp
pop ebp
ret 4