Function at 0x407270
Capabilities:
Check http status code
Create http request
Download and write a file
Get file size
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x425991
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1074
call fcn.00419d20
mov eax, dword [0x4309b0]
push ebx
mov dword [esp + 0x1074], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x40761f
push eax
call fcn.004195c1
add esp, 4
test eax, eax
je 0x40761f
mov esi, dword [ebp + 0xc]
cmp esi, ebx
je 0x40761f
push esi
call fcn.004195c1
add esp, 4
test eax, eax
je 0x40761f
mov eax, dword [0x432844]
mov ecx, 0x432844
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x108c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], ebx
call fcn.00411cd0
push ebx
push 0x80
mov byte [esp + 0x80], bl
xor eax, eax
mov ecx, 0x3ff
lea edi, [esp + 0x81]
rep stosd dword es:[edi], eax
push 3
push ebx
push 1
stosw word es:[edi], ax
push 0x40000000
push esi
mov byte [esp + 0x10a8], 1
mov dword [esp + 0x34], 0xea60
mov dword [esp + 0x48], ebx
mov dword [esp + 0x50], 4
stosb byte es:[edi], al
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
push ebx
jne 0x407386
push 0x80
push 2
push ebx
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x14], ebx
jmp 0x407391
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x14], eax
cmp edi, 0xffffffff
jne 0x40739d
xor esi, esi
jmp 0x4075d9
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [esp + 0x10]
call fcn.004025f0
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1090], 2
call fcn.00411ee0
lea ecx, [esp + 0xc]
movzx esi, al
mov byte [esp + 0x108c], 1
call fcn.00401dc0
cmp esi, ebx
je 0x407606
cmp dword [esp + 0x6c], 3
jne 0x407606
push ebx
push ebx
push ebx
push ebx
push str.bdget
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [esp + 0xc], eax
je 0x407606
push 4
lea edx, [esp + 0x1c]
push edx
push 2
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, eax
cmp esi, ebx
je 0x4075ce
mov ecx, dword [esp + 0xc]
push 4
lea eax, [esp + 0x1c]
push eax
push 5
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, eax
cmp esi, ebx
je 0x4075ce
mov eax, dword [esp + 0xc]
push 4
lea edx, [esp + 0x1c]
push edx
push 5
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, eax
cmp esi, ebx
je 0x4075ce
mov edx, dword [esp + 0xc]
push 4
lea ecx, [esp + 0x1c]
push ecx
push 6
push edx
mov dword [esp + 0x28], ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, eax
cmp esi, ebx
je 0x4075ce
mov ecx, dword [esp + 0xc]
push 4
lea eax, [esp + 0x1c]
push eax
push 6
push ecx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, eax
cmp esi, ebx
je 0x4075ce
mov esi, dword [esp + 0x14]
cmp esi, ebx
je 0x4074ce
push esi
push str.Accept:___r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_5.00__Windows_98__r_n
lea edx, [esp + 0x24]
push 0x427ecc
push edx
call fcn.00403ed0
mov eax, dword [esp + 0x2c]
add esp, 0x10
push ebx
push ebx
push esi
push edi
mov dword [esp + 0x34], 0xffffffff
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
mov eax, dword [ebp + 8]
push ebx
push 0x44000000
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x4074fc
xor esi, esi
jmp 0x4075bf
push ebx
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x34]
push ecx
push 0x20000013
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov esi, eax
cmp esi, ebx
je 0x4075bf
mov eax, dword [esp + 0x2c]
cmp eax, 0xc8
je 0x40753d
cmp eax, 0xce
je 0x40753d
cmp eax, 0x130
je 0x40753d
xor esi, esi
jmp 0x4075bf
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push 0x1000
lea eax, [esp + 0x80]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov esi, eax
cmp esi, ebx
je 0x4075bf
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x4075ba
push ebx
lea edx, [esp + 0x2c]
push edx
push eax
lea eax, [esp + 0x84]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
cmp esi, ebx
je 0x4075bf
mov ecx, dword [esp + 0x28]
cmp ecx, dword [esp + 0x20]
jne 0x4075bf
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push 0x1000
lea eax, [esp + 0x80]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov esi, eax
cmp esi, ebx
jne 0x407560
jmp 0x4075bf
mov esi, 1
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x4075ce
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
lea ecx, [esp + 0x38]
setne byte [esp + 0x13]
mov byte [esp + 0x108c], bl
call fcn.00411da0
lea ecx, [esp + 0x1c]
call fcn.00401dc0
mov al, byte [esp + 0x13]
jmp 0x407621
lea ecx, [esp + 0x38]
mov byte [esp + 0x108c], bl
call fcn.00411da0
lea ecx, [esp + 0x1c]
call fcn.00401dc0
xor al, al
mov ecx, dword [esp + 0x1084]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x107c]
call fcn.0041931e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret