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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push edi
mov esi, eax
mov eax, dword [ebp + 8]
push 1
push str.Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1__Trident_4.0_
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x28], 4
xor ebx, ebx
mov dword [ebp - 0x18], edi
mov dword [eax], edi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x401cf5
movzx ecx, word [esi + 0x28]
push ebx
push ebx
push 3
push ebx
push ebx
push ecx
lea edx, [esi + 0x2a]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x401ceb
cmp dword [esi + 0x430], 1
mov edx, 0x84000300
jne 0x401b16
mov edx, 0x84803300
mov ecx, dword [esi + 0x14]
push 0
push edx
push 0
lea edx, [esi + 4]
test ecx, ecx
jne 0x401b43
mov ecx, dword [esi + 0x42c]
push 0x40a768
push str.HTTP_1.1
push ecx
push edx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 4], eax
jmp 0x401b5b
push ecx
mov ecx, dword [esi + 0x42c]
push str.HTTP_1.1
push ecx
push edx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 4], eax
test eax, eax
je 0x401ce1
push 4
lea ecx, [ebp - 0x18]
push ecx
push 6
push eax
mov dword [ebp - 0x18], 0x927c0
call dword [sym.imp.WININET.dll_InternetSetOptionA]
cmp dword [esi + 0x430], 1
mov dword [ebp - 0x10], eax
jne 0x401bb9
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0xc]
push eax
push 0x1f
push ecx
mov dword [ebp - 0x20], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
mov eax, dword [ebp - 4]
or dword [ebp - 0xc], 0x100
push 4
lea edx, [ebp - 0xc]
push edx
push 0x1f
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionA]
mov eax, dword [esi]
cmp eax, 1
jne 0x401bd0
push 0
push 0x40a768
push 0
push 0x40a768
jmp 0x401be4
cmp eax, 2
jne 0x401bf1
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
push edx
push eax
push 0x2f
push str.Content_Type:_application_x_www_form_urlencoded
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], ebx
je 0x401cd7
mov esi, dword [sym.imp.msvcrt.dll_realloc]
push 0x400
lea edx, [ebp - 0x428]
push 0
push edx
mov dword [ebp - 8], 0
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 4]
add esp, 0xc
lea eax, [ebp - 8]
push eax
push 0x400
lea ecx, [ebp - 0x428]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x401c6a
mov eax, dword [ebp - 8]
test eax, eax
je 0x401c6a
add eax, edi
push eax
push ebx
call esi
mov ebx, eax
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0x428]
push ecx
lea edx, [ebx + edi]
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 8]
add esp, 0x14
add edi, eax
test eax, eax
jne 0x401c00
mov edx, dword [ebp - 4]
push 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x14]
push ecx
push 0x20000013
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test edi, edi
je 0x401c8b
test ebx, ebx
jne 0x401cb7
cmp dword [ebp - 0x14], 0xc8
jne 0x401cc0
test ebx, ebx
je 0x401cd2
test edi, edi
je 0x401cd2
lea eax, [edi + 0xb]
push eax
push ebx
call esi
mov cl, byte [0x40a8e0]
mov byte [eax + edi], cl
add esp, 8
mov byte [eax + edi + 1], 0
inc edi
mov ebx, eax
cmp dword [ebp - 0x14], 0xc8
je 0x401cd2
test ebx, ebx
je 0x401cce
push ebx
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
xor ebx, ebx
xor edi, edi
mov edx, dword [ebp + 8]
mov dword [edx], ebx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0
push 0
push 0x27
push 0
call dword [sym.imp.WININET.dll_InternetSetOptionA]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret