Function at 0x40c44d
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Parse url
Read and send data from client to server
Read data from internet
Read file on windows
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push 0x57c
push 0x4358c8
call fcn.00410df4
mov dword [ebp - 0x4c], 4
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x18c], bl
mov edi, dword [ebp + 8]
push edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
test eax, eax
je 0x40c90f
push edi
call fcn.0040f103
pop ecx
test eax, eax
je 0x40c90f
cmp dword [ebp + 0x14], ebx
je 0x40c4a8
lea eax, [ebp - 0x18c]
push eax
push edi
call fcn.0040f93f
pop ecx
pop ecx
lea eax, [ebp - 0x18c]
push eax
call esi
test eax, eax
je 0x40c4f7
push ebx
push 0x20
push 3
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x18c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c4f7
push ebx
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], ebx
ja 0x40c90f
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], 0x80004005
mov dword [ebp - 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x42ed2c
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x44], eax
cmp eax, ebx
je 0x40c86f
push 0x3c
pop esi
push esi
push ebx
lea eax, [ebp - 0x88]
push eax
call fcn.00411920
add esp, 0xc
mov dword [ebp - 0x88], esi
lea eax, [ebp - 0x38c]
mov dword [ebp - 0x78], eax
mov eax, 0x100
mov dword [ebp - 0x74], eax
xor ecx, ecx
mov word [ebp - 0x70], cx
lea ecx, [ebp - 0x58c]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x48c]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x88]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push ebx
push ebx
push 3
push 0x42e9da
push 0x42e9db
push dword [ebp - 0x70]
push dword [ebp - 0x78]
push dword [ebp - 0x44]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x34], eax
cmp eax, ebx
je 0x40c86f
lea eax, [ebp - 0x28c]
cmp dword [ebp - 0x58], ebx
je 0x40c5bf
push dword [ebp - 0x5c]
jmp 0x40c5c4
push 0x42ed34
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [ebp - 0x50], ebx
je 0x40c5e0
push dword [ebp - 0x54]
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x2c], ebx
push ebx
push 0x4400000
push ebx
push 0x42e9e2
push 0x42ed38
lea eax, [ebp - 0x28c]
push eax
push 0x42ed44
push dword [ebp - 0x34]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x40c86f
xor esi, esi
inc esi
mov dword [ebp - 0x1c], esi
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x24]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40c68d
cmp dword [ebp - 0x1c], ebx
je 0x40c86f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
sub ecx, 0x2ee2
je 0x40c677
sub ecx, 5
je 0x40c677
sub ecx, 0x16
je 0x40c677
mov dword [ebp - 0x1c], ebx
push ebx
push 7
push eax
push dword [ebp - 0x24]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
jne 0x40c623
jmp 0x40c620
mov dword [ebp - 0x1c], ebx
cmp dword [ebp + 0x18], ebx
je 0x40c623
push ebx
push ebx
push eax
push ebx
call fcn.0040c2a3
add esp, 0x10
jmp 0x40c623
cmp dword [ebp - 0x1c], ebx
je 0x40c86f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x38], ebx
push ebx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x20000013
mov edi, dword [ebp - 0x24]
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40c6c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x1c], 1
mov edx, dword [ebp - 0x38]
cmp edx, 0x197
jne 0x40c723
cmp dword [ebp - 0x1c], ebx
je 0x40c723
push ebx
push 7
push esi
push edi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
je 0x40c6fa
mov dword [ebp - 0x1c], ebx
jmp 0x40c6cc
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [ebp - 0x4c], 4
push ebx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x20000013
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
jmp 0x40c6cc
cmp edx, 0xc8
jne 0x40c768
mov dword [ebp - 0x20], ebx
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp + 0xc]
add eax, ecx
lea edx, [ebp - 0x20]
push edx
mov edx, dword [ebp + 0x10]
sub edx, ecx
push edx
push eax
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40c752
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], ebx
ja 0x40c72b
cmp dword [ebp - 0x28], ebx
jbe 0x40c866
mov dword [ebp - 0x30], ebx
jmp 0x40c866
lea eax, [edx - 0x190]
cmp eax, 0xc7
ja 0x40c84b
mov eax, 0x193
cmp edx, eax
je 0x40c81b
add eax, 0x61
cmp edx, eax
jne 0x40c7b4
cmp dword [ebp + 0x18], ebx
je 0x40c82f
push 1
push ebx
push eax
push ebx
call fcn.0040c2a3
add esp, 0x10
test eax, eax
je 0x40c82f
mov dword [ebp - 0x2c], 1
jmp 0x40c82f
mov ecx, 0x1f7
cmp edx, ecx
jne 0x40c813
cmp dword [ebp - 0x3c], 5
jge 0x40c7f1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], ebx
jl 0x40c7de
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
dec dword [ebp - 0x48]
jmp 0x40c7c9
inc dword [ebp - 0x3c]
add dword [ebp - 0x40], 0x1e
mov dword [ebp - 0x2c], 1
jmp 0x40c5e9
cmp dword [ebp + 0x18], ebx
je 0x40c82f
push 1
push ebx
push ecx
push ebx
call fcn.0040c2a3
add esp, 0x10
test eax, eax
je 0x40c82f
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], 0x3c
jmp 0x40c7e5
cmp edx, 0x194
je 0x40c82f
xor ecx, ecx
cmp dword [ebp + 0x18], ebx
push ebx
sete cl
push ecx
push eax
push ebx
call fcn.0040c2a3
add esp, 0x10
xor eax, eax
cmp dword [ebp - 0x38], 0x194
setne al
dec eax
and eax, 0x6c1fd
add eax, 0x80004005
mov dword [ebp - 0x30], eax
jmp 0x40c866
push ebx
xor eax, eax
cmp dword [ebp + 0x18], ebx
sete al
push eax
push edx
push ebx
call fcn.0040c2a3
add esp, 0x10
mov dword [ebp - 0x30], 0x80004005
cmp dword [ebp - 0x2c], ebx
jne 0x40c5e9
or dword [ebp - 4], 0xffffffff
call fcn.0040c8e4
cmp dword [ebp - 0x30], ebx
jne 0x40c8dd
lea eax, [ebp - 0x18c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x40c8dd
push ebx
push 0x20
push 4
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x18c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c8dd
push ebx
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x28]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x1c], ebx
je 0x40c8dd
push dword [ebp + 0x1c]
lea eax, [ebp - 0x18c]
push eax
call fcn.0040d60f
pop ecx
pop ecx
mov eax, dword [ebp - 0x30]
jmp 0x40c911
xor eax, eax
call fcn.00410e2f
ret