Function at 0x402bc6
Capabilities:
Connect to http server
Create http request
Download and write a file
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4c6c
call fcn.00403aba
push ebx
push esi
push edi
push 1
pop eax
xor ebx, ebx
cmp dword [ebp + 8], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0xc68], bl
mov dword [ebp - 4], eax
jle 0x402d07
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], 2
lea esi, [eax + 4]
lea edi, [eax + 8]
push 0x4020e0
push dword [esi]
call fcn.00403a85
pop ecx
test eax, eax
pop ecx
jne 0x402c47
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jge 0x402c3d
inc dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [esi + 4]
add edi, 4
add esi, 4
mov dword [ebp - 0x10], eax
jmp 0x402cea
call fcn.00402b13
jmp 0x402cea
push 0x4020c0
push dword [esi]
call fcn.00403a85
pop ecx
test eax, eax
pop ecx
jne 0x402c75
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jge 0x402c3d
inc dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [esi + 4]
add edi, 4
add esi, 4
mov dword [ebp - 0x18], eax
jmp 0x402cea
push 0x4020a4
push dword [esi]
call fcn.00403a85
pop ecx
test eax, eax
pop ecx
jne 0x402ca3
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jge 0x402c3d
inc dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [esi + 4]
add edi, 4
add esi, 4
mov dword [ebp - 0xc], eax
jmp 0x402cea
mov eax, dword [ebp + 8]
cmp dword [ebp - 8], eax
jge 0x402cd0
push dword [edi]
lea eax, [ebp - 0x24]
push dword [esi]
push eax
lea eax, [ebp - 0xc68]
push eax
call fcn.004029d2
add esp, 0x10
inc dword [ebp - 4]
inc dword [ebp - 8]
add edi, 4
add esi, 4
jmp 0x402cea
push 0x4020a2
lea eax, [ebp - 0x24]
push dword [esi]
push eax
lea eax, [ebp - 0xc68]
push eax
call fcn.004029d2
add esp, 0x10
inc dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [ebp - 4]
add edi, 4
add esi, 4
cmp eax, dword [ebp + 8]
jl 0x402c0c
cmp dword [ebp - 0xc], ebx
jne 0x402d0c
call fcn.00402b13
push 0x402090
push dword [ebp - 0xc]
call fcn.00403a44
pop ecx
test eax, eax
pop ecx
jne 0x402d4b
push 0x40207c
push dword [ebp - 0xc]
call fcn.00403a44
pop ecx
test eax, eax
pop ecx
jne 0x402d4b
mov esi, 0x409090
push 0x401fac
push esi
call fcn.0040376b
pop ecx
pop ecx
call fcn.00402b13
jmp 0x402d50
mov esi, 0x409090
lea eax, [ebp - 0x4c6c]
push 1
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x1468]
mov dword [ebp - 0x54], eax
pop edi
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 0x3c
push eax
push ebx
push ebx
mov dword [ebp - 0x60], ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], 0x1000
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x50], 0x400
mov word [ebp - 0x4c], di
call dword [sym.imp.WININET.DLL_InternetCrackUrlW]
test eax, eax
jne 0x402dc6
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push 0x401ef0
push esi
call fcn.0040376b
add esp, 0xc
mov dword [ebp - 0x14], edi
jmp 0x402f3c
push dword [ebp - 0xc]
call fcn.00403a27
mov edx, dword [ebp - 0x5c]
pop ecx
mov ecx, dword [ebp - 0x50]
lea ecx, [ecx + edx + 3]
cmp ecx, eax
jbe 0x402de2
call fcn.00402b13
push ebx
push ebx
push ebx
push ebx
push 0x401e88
call dword [sym.imp.WININET.DLL_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x402e0c
push 0x401e40
push esi
call fcn.0040376b
pop ecx
mov eax, edi
pop ecx
jmp 0x402f3f
push 0x401e30
lea eax, [ebp - 0x24]
push 0x401e1c
push eax
lea eax, [ebp - 0xc68]
push eax
call fcn.004029d2
add esp, 0x10
cmp dword [ebp - 0x10], ebx
je 0x402e55
cmp dword [ebp - 0x18], ebx
je 0x402e55
push edi
push ebx
push 3
lea eax, [ebp - 0x1468]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp - 0x4c]
push eax
push dword [ebp - 4]
call dword [sym.imp.WININET.DLL_InternetConnectW]
mov dword [ebp - 0xc], eax
jmp 0x402eb8
mov ax, word [0x4020a2]
push edi
push ebx
push 3
push dword [ebp - 0x18]
mov word [ebp + 0xa], ax
lea eax, [ebp - 0x1468]
push dword [ebp - 0x10]
push dword [ebp - 0x4c]
push eax
push dword [ebp - 4]
call dword [sym.imp.WININET.DLL_InternetConnectW]
mov dword [ebp - 0xc], eax
lea eax, [ebp + 0xa]
push ebx
push eax
call fcn.00403a27
pop ecx
mov esi, dword [sym.imp.WININET.DLL_InternetSetOptionExW]
push eax
lea eax, [ebp + 0xa]
push eax
push 0x1c
push dword [ebp - 0xc]
call esi
lea eax, [ebp + 0xa]
push ebx
push eax
call fcn.00403a27
pop ecx
push eax
lea eax, [ebp + 0xa]
push eax
push 0x1d
push dword [ebp - 0xc]
call esi
mov esi, 0x409090
cmp dword [ebp - 0xc], ebx
jne 0x402ecf
push 0x401db8
push esi
call fcn.0040376b
pop ecx
mov dword [ebp - 0x14], edi
pop ecx
jmp 0x402f33
lea eax, [ebp - 0x64]
push eax
call fcn.00402b2b
neg al
sbb eax, eax
pop ecx
and eax, 0x800000
push edi
or eax, 0x84400000
push eax
push 0x40902c
push ebx
lea eax, [ebp - 0x4c6c]
push ebx
push eax
push 0x401dac
push dword [ebp - 0xc]
call dword [sym.imp.WININET.DLL_HttpOpenRequestW]
cmp eax, ebx
mov dword [ebp + 0xc], eax
jne 0x402f44
push 0x401d64
push esi
call fcn.0040376b
pop ecx
mov dword [ebp - 0x14], edi
pop ecx
cmp dword [ebp + 0xc], ebx
je 0x402f2a
push dword [ebp + 0xc]
call dword [sym.imp.WININET.DLL_InternetCloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.WININET.DLL_InternetCloseHandle]
push dword [ebp - 4]
call dword [sym.imp.WININET.DLL_InternetCloseHandle]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret
mov edi, dword [sym.imp.WININET.DLL_HttpAddRequestHeadersW]
mov esi, 0x10000000
push esi
push 0xffffffffffffffff
push 0x401180
push dword [ebp + 0xc]
call edi
push esi
push 0xffffffffffffffff
push 0x401204
push dword [ebp + 0xc]
call edi
lea eax, [ebp - 0xc68]
mov byte [ebp + 0xb], 1
push eax
call fcn.004039ae
pop ecx
mov esi, dword [sym.imp.WININET.DLL_HttpSendRequestA]
push eax
lea eax, [ebp - 0xc68]
push eax
push ebx
push ebx
push dword [ebp + 0xc]
call esi
test eax, eax
jne 0x4030c7
mov ecx, 0x1ff
lea edi, [ebp - 0x1c66]
mov word [ebp - 0x1c68], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
cmp edi, 0x2f0c
je 0x402ffa
cmp edi, 0x2f07
je 0x402ffa
cmp edi, 0x2eee
je 0x402ffa
cmp edi, 0x2f0d
je 0x402ffa
cmp edi, 0x2f0b
je 0x402ffa
cmp edi, 0x2f06
je 0x402ffa
cmp edi, 0x2f05
je 0x402ffa
cmp byte [ebp + 0xb], bl
je 0x403065
cmp edi, 0x2ee0
jb 0x403065
push ebx
push 7
push edi
mov byte [ebp + 0xb], bl
push dword [ebp + 0xc]
call dword [sym.imp.USER32.DLL_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.DLL_InternetErrorDlg]
test eax, eax
jne 0x4030aa
push 4
lea eax, [ebp - 0x18]
pop edi
push eax
lea eax, [ebp - 0x10]
push eax
push 0x1f
push dword [ebp + 0xc]
mov dword [ebp - 0x18], edi
call dword [sym.imp.WININET.DLL_InternetQueryOptionA]
or byte [ebp - 0xf], 1
lea eax, [ebp - 0x10]
push edi
push eax
push 0x1f
push dword [ebp + 0xc]
call dword [sym.imp.WININET.DLL_InternetSetOptionA]
lea eax, [ebp - 0xc68]
push eax
call fcn.004039ae
pop ecx
push eax
lea eax, [ebp - 0xc68]
push eax
push ebx
push ebx
push dword [ebp + 0xc]
jmp 0x402f8d
mov esi, 0x409090
push 0x401d38
push esi
call fcn.0040376b
push edi
push 0x401d18
push esi
call fcn.0040376b
lea eax, [ebp - 0x1c68]
push 0x400
push eax
push edi
call fcn.00402b50
lea eax, [ebp - 0x1c68]
push eax
push 0x401cf0
push esi
call fcn.0040376b
add esp, 0x2c
jmp 0x4030bb
push 0x401cc0
push 0x409090
call fcn.0040376b
pop ecx
pop ecx
mov dword [ebp - 0x14], 1
jmp 0x402f1c
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0xc]
call fcn.00402ac9
cmp dword [ebp - 0x20], 0x191
pop ecx
pop ecx
jne 0x40316e
lea eax, [ebp - 0x1c]
mov edi, 0x400
push eax
lea eax, [ebp - 0x468]
push edi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WININET.DLL_InternetReadFile]
test eax, eax
je 0x40310b
cmp dword [ebp - 0x1c], ebx
je 0x40310b
lea eax, [ebp - 0x1c]
push eax
jmp 0x4030eb
push ebx
push 6
push 0x2eee
push dword [ebp + 0xc]
call dword [sym.imp.USER32.DLL_GetDesktopWindow]
push eax
call dword [sym.imp.WININET.DLL_InternetErrorDlg]
cmp eax, 0x2f00
je 0x403142
push 0x401c7c
push 0x409090
call fcn.0040376b
pop ecx
pop ecx
push 1
call fcn.00403678
lea eax, [ebp - 0xc68]
push eax
call fcn.004039ae
pop ecx
push eax
lea eax, [ebp - 0xc68]
push eax
push ebx
push ebx
push dword [ebp + 0xc]
call esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0xc]
call fcn.00402ac9
pop ecx
pop ecx
jmp 0x403173
mov edi, 0x400
cmp dword [ebp - 0x20], 0xc8
je 0x4031a9
cmp dword [ebp - 0x20], 0x191
jne 0x40318f
push 0x401c4c
jmp 0x4030af
push dword [ebp - 0x20]
push 0x401b9c
push 0x409090
call fcn.0040376b
add esp, 0xc
jmp 0x4030bb
mov esi, dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push 0xfffffffffffffff5
call esi
lea ecx, [ebp - 0x28]
push ebx
push ecx
push ebx
push ebx
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x4031e4
lea eax, [ebp - 0x28]
or byte [ebp + 0xa], 0xff
push ebx
push eax
lea eax, [ebp + 0xa]
push 2
push eax
mov byte [ebp + 0xb], 0xfe
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x468]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WININET.DLL_InternetReadFile]
test eax, eax
je 0x402f1c
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x402f1c
mov byte [ebp + eax - 0x468], bl
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x2c6c]
push eax
lea eax, [ebp - 0x468]
push eax
mov dword [ebp + 8], 0x1002
call fcn.004028bb
add esp, 0xc
push 0xfffffffffffffff5
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x403272
lea eax, [ebp + 8]
push ebx
push eax
lea eax, [ebp - 0x2c6c]
push dword [ebp + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x403272
lea eax, [ebp + 8]
push ebx
push eax
mov eax, dword [ebp + 8]
add eax, eax
push eax
lea eax, [ebp - 0x2c6c]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea eax, [ebp - 0x1c]
push eax
push 0x400
jmp 0x4031e9