Function at 0x401c40
Capabilities:
Connect to http server
Create http request
Create thread
Get http content length
Parse url
Read data from internet
Receive data
Terminate thread

Disassembly:
push ebp
mov ecx, 0xf
mov ebp, esp
push edi
push esi
push ebx
lea edi, [ebp - 0x4c]
sub esp, 0x68
lea ebx, [ebp - 0x4c]
mov eax, dword [ebp + 0xc]
cld
mov dword [eax], 0
xor eax, eax
mov dword [ebp - 0x74], 0
rep stosd dword es:[edi], eax
push dword [ebp + 8]
mov dword [ebp - 0x4c], 0x3c
call sub.KERNEL32.dll_lstrlenA
mov dword [ebp - 0x60], eax
inc eax
push eax
call fcn.00401012
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x38], eax
inc eax
push eax
call fcn.00401012
push ebx
push 0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x60]
push dword [ebp + 8]
mov dword [ebp - 0x1c], eax
call sub.KERNEL32.dll_lstrlenA
push eax
push dword [ebp + 8]
call sub.WININET.DLL_InternetCrackUrlA
pop ecx
test eax, eax
mov dword [ebp - 0x60], eax
pop ebx
je 0x401cdb
mov eax, dword [ebp - 0x40]
sub eax, 3
cmp eax, 1
ja 0x401cdb
mov edx, dword [ebp - 0x3c]
test edx, edx
je 0x401cdb
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x401cdb
cmp byte [edx], 0
je 0x401cdb
cmp byte [eax], 0
jne 0x401d06
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x401cfd
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x401cf4
mov eax, dword [ebp - 0x74]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
call fcn.00401000
pop esi
jmp 0x401ce9
push eax
call fcn.00401000
pop edi
jmp 0x401ce2
push 0
push 0
push 0
push 1
push 0
call sub.WININET.DLL_InternetOpenA
test eax, eax
mov dword [ebp - 0x68], eax
je 0x401e1b
cmp dword [ebp - 0x40], 4
je 0x401fe4
mov eax, 0x50
push 0
mov dword [ebp - 0x60], eax
push 0
push 3
push 0
push 0
movzx eax, word [ebp - 0x60]
push eax
push dword [ebp - 0x3c]
push dword [ebp - 0x68]
call sub.WININET.DLL_InternetConnectA
test eax, eax
mov dword [ebp - 0x6c], eax
je 0x401e13
cmp dword [ebp - 0x40], 4
je 0x401fda
xor eax, eax
push 0
mov dword [ebp - 0x60], eax
or eax, 0x4080200
push eax
mov eax, str.POST
push 0
push 0
push str.HTTP_1.0
push dword [ebp - 0x20]
cmp dword [ebp + 0x14], 0
je 0x401fd3
push eax
push dword [ebp - 0x6c]
call sub.WININET.DLL_HttpOpenRequestA
test eax, eax
mov dword [ebp - 0x70], eax
je 0x401e0b
mov dword [ebp - 0x60], eax
lea edx, [ebp - 0x60]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x58], eax
mov edx, dword [ebp + 0x14]
lea eax, [ebp - 0x64]
mov dword [ebp - 0x54], edx
push eax
lea eax, [ebp - 0x5c]
push 0
push eax
push 0x401b92
push 0
push 0
mov dword [ebp - 0x64], 0
call sub.KERNEL32.dll_CreateThread
mov ebx, eax
test eax, eax
je 0x401fc7
push 0x1388
push eax
call sub.KERNEL32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x401fb3
push ebx
call sub.KERNEL32.dll_CloseHandle
cmp dword [ebp - 0x60], 0
jne 0x401ea7
cmp dword [ebp - 0x40], 4
je 0x401e64
push dword [ebp - 0x70]
call sub.WININET.DLL_InternetCloseHandle
push dword [ebp - 0x6c]
call sub.WININET.DLL_InternetCloseHandle
push dword [ebp - 0x68]
call sub.WININET.DLL_InternetCloseHandle
cmp dword [ebp - 0x74], 0
jne 0x401cdb
cmp dword [ebp - 0x40], 4
jne 0x401cdb
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x60], eax
mov dword [edx], 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edx
push dword [ebp + 8]
call fcn.00401848
test eax, eax
mov dword [ebp - 0x74], eax
jne 0x401cdb
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x60]
mov dword [edx], eax
jmp 0x401cdb
call sub.KERNEL32.dll_GetLastError
mov edx, dword [ebp + 0xc]
cmp eax, 0x2efd
mov dword [ebp - 0x60], eax
mov dword [edx], 0
je 0x401e9c
cmp eax, 0x2eff
je 0x401e9c
cmp eax, 0x2f7d
jne 0x401e03
mov eax, dword [ebp + 0xc]
mov dword [eax], 4
jmp 0x401e03
mov edx, dword [ebp + 0xc]
mov dword [edx], 3
jmp 0x401e83
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp + 0xc]
push 0x20000005
push dword [ebp - 0x70]
mov dword [ebp - 0x60], 4
mov dword [ebp - 0x4c], 0
call sub.WININET.DLL_HttpQueryInfoA
test eax, eax
je 0x401f27
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
inc eax
push eax
call fcn.00401012
pop edx
test eax, eax
mov dword [ebp - 0x74], eax
je 0x401e03
lea eax, [ebp - 0x60]
mov edx, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x60], 0
push dword [edx]
push dword [ebp - 0x74]
push dword [ebp - 0x70]
call sub.WININET.DLL_InternetReadFile
cmp dword [ebp - 0x74], 0
je 0x401e03
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
test eax, eax
je 0x401e03
mov edx, dword [ebp - 0x74]
mov byte [eax + edx], 0
jmp 0x401e03
push 0x400
call fcn.00401012
pop esi
mov ebx, eax
test eax, eax
je 0x401f04
lea edx, [ebp - 0x60]
push edx
push 0x400
push ebx
push dword [ebp - 0x70]
mov dword [ebp - 0x60], 0
call sub.WININET.DLL_InternetReadFile
mov eax, dword [ebp - 0x60]
test eax, eax
jne 0x401f67
cmp dword [ebp - 0x60], 0
jne 0x401f38
push ebx
call fcn.00401000
pop eax
jmp 0x401f04
mov edx, dword [ebp + 0xc]
add eax, dword [edx]
inc eax
push eax
push dword [ebp - 0x74]
call fcn.00401022
pop edx
pop ecx
test eax, eax
je 0x401f98
mov dword [ebp - 0x74], eax
mov edi, eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x60]
cld
add edi, dword [eax]
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x60]
add dword [edx], eax
jmp 0x401f58
push dword [ebp - 0x74]
call fcn.00401000
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x74], 0
mov dword [eax], 2
pop edi
jmp 0x401f5e
push 0
push ebx
call sub.KERNEL32.dll_TerminateThread
mov dword [ebp - 0x60], 0
jmp 0x401ded
mov dword [ebp - 0x60], 0
jmp 0x401df3
xor eax, eax
jmp 0x401d89
mov eax, 0x803000
jmp 0x401d63
mov eax, 0x1bb
jmp 0x401d2f