Function at 0x401550
Capabilities:
Check http status code
Create http request
Download and write a file
Encode data using xor
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
sub esp, 0x460
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
push ebx
push ebx
push ebx
push 0x4044ec
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
jne 0x401584
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x460
ret
mov ecx, dword [esp + 0x474]
push ebx
push 0xa4000000
push ebx
push ebx
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x20], esi
jne 0x4015b2
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x460
ret
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x51]
mov byte [esp + 0x50], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x18]
push ebx
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoA]
lea eax, [esp + 0x54]
push edx
push eax
push 0x13
push esi
mov dword [esp + 0x2c], 0x20
call ebx
test eax, eax
jne 0x4015f6
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x460
ret
mov ebp, dword [sym.imp.MSVCRT.dll_atol]
lea ecx, [esp + 0x50]
push ecx
call ebp
add esp, 4
cmp eax, 0xc8
je 0x40161a
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x460
ret
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x18]
push 0
lea eax, [esp + 0x34]
push edx
push eax
push 5
push esi
call ebx
test eax, eax
je 0x401660
lea ecx, [esp + 0x30]
push ecx
call ebp
mov edi, eax
push edi
push 0x4044e8
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0xc
test edi, edi
ja 0x40167e
push 0xc8000
call sub.MFC42.DLL_operatornew
mov ebx, eax
mov ecx, 0x32000
xor eax, eax
mov edi, ebx
add esp, 4
xor ebp, ebp
rep stosd dword es:[edi], eax
jmp 0x4016a5
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
xor ebp, ebp
rep stosb byte es:[edi], al
jmp 0x4016a5
mov esi, dword [esp + 0x20]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x70]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x70]
push eax
push 0x400
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [esp + 0x14]
lea esi, [esp + 0x70]
mov edx, ecx
lea edi, [ebx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
add ebp, eax
test eax, eax
ja 0x4016a1
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x30]
push ecx
push edx
push ebx
call fcn.00401360
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
ja 0x401718
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x460
ret
push eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x14]
mov ebp, eax
mov eax, dword [esp + 0x28]
mov edx, ecx
mov edi, ebp
add esp, 4
lea esi, [eax + ebx]
xor eax, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jbe 0x40175a
mov cl, byte [eax + ebp]
xor cl, 0x80
mov byte [eax + ebp], cl
mov ecx, dword [esp + 0x10]
inc eax
cmp eax, ecx
jb 0x401748
lea eax, [ecx + ecx*2]
push eax
call sub.MFC42.DLL_operatornew
mov esi, eax
mov eax, dword [esp + 0x14]
mov edi, esi
lea ecx, [eax + eax*2]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push eax
push esi
push ecx
push ebp
call fcn.004013c0
mov edx, dword [esp + 0x48c]
add esp, 0x14
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [esp + 0x28]
mov edi, eax
lea eax, [esp + 0x1c]
push 0
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4017d6
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x460
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call sub.MFC42.DLL_operatordelete
push ebp
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret