Function at 0x422da0
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55f4f8
mov eax, dword fs:[0]
push eax
mov eax, 0x4044
call fcn.0052f4d0
mov eax, dword [0x5bbd60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x24]
mov edi, ecx
mov dword [ebp - 0x4038], eax
xor esi, esi
mov dword [ebp - 4], esi
cmp edi, esi
jne 0x422dff
cmp dword [ebp + 0x1c], 0x10
jb 0x422df8
mov ecx, dword [ebp + 8]
push ecx
call fcn.00427ab5
add esp, 4
xor eax, eax
jmp 0x42302f
push esi
lea edx, [ebp - 0x403c]
push edx
lea eax, [ebp - 0x24]
push eax
push 5
push edi
mov dword [ebp - 0x402c], esi
mov dword [ebp - 0x403c], 0x14
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x422e45
mov ecx, dword [ebp - 0x403c]
lea edx, [ebp - 0x24]
push edx
mov byte [ebp + ecx - 0x24], 0
call fcn.0052b4e1
add esp, 4
mov dword [ebp - 0x404c], eax
lea eax, [ebp - 0x402c]
push eax
push 0x4000
lea ecx, [ebp - 0x4028]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebp + 0x1c], 0x10
mov ebx, eax
mov eax, dword [ebp + 8]
jae 0x422e6d
lea eax, [ebp + 8]
push 0x5904e8
push eax
lea edx, [ebp - 0x4034]
push edx
call fcn.00528484
add esp, 0xc
cmp dword [ebp - 0x4034], esi
jne 0x422f0e
push str.open_file_failed__
push 0x5ca2b8
call fcn.00423360
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004230e0
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x422ed0
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x422ed0
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x422ef1
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x422ee9
or eax, 4
push 0
push eax
call fcn.004145f0
cmp dword [ebp + 0x1c], 0x10
jb 0x422df8
mov edx, dword [ebp + 8]
push edx
call fcn.00427ab5
add esp, 4
xor eax, eax
jmp 0x42302f
test ebx, ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
je 0x422ff4
cmp dword [ebp - 0x402c], 0
je 0x42304d
mov eax, esi
mov dword [ebp - 0x4044], eax
fild dword [ebp - 0x4044]
push 0
test eax, eax
jns 0x422f43
fadd qword [0x596508]
mov ecx, dword [ebp - 0x404c]
fild dword [ebp - 0x404c]
test ecx, ecx
jns 0x422f59
fadd qword [0x596508]
fdivp st(1)
fmul qword [0x596500]
fnstcw word [ebp - 0x402e]
movzx eax, word [ebp - 0x402e]
or eax, 0xc00
mov dword [ebp - 0x4044], eax
mov eax, dword [ebp - 0x4038]
mov ecx, dword [eax + 0x20]
fldcw word [ebp - 0x4044]
fistp qword [ebp - 0x4048]
mov edx, dword [ebp - 0x4048]
push edx
push 0xbdb
fldcw word [ebp - 0x402e]
push ecx
call ebx
mov edx, dword [ebp - 0x4034]
mov eax, dword [ebp - 0x402c]
push edx
push eax
lea ecx, [ebp - 0x4028]
push 1
push ecx
call fcn.00528b3a
mov ecx, dword [ebp - 0x402c]
add esp, 0x10
cmp eax, ecx
jne 0x4230b9
lea edx, [ebp - 0x402c]
push edx
push 0x4000
lea eax, [ebp - 0x4028]
push eax
push edi
add esi, ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x422f1c
mov eax, dword [ebp - 0x4038]
mov ecx, dword [eax + 0x20]
push 0
push 0x63
push 0xbdb
push ecx
call ebx
mov edx, dword [ebp - 0x4034]
push edx
call fcn.0052896f
add esp, 4
cmp dword [ebp + 0x1c], 0x10
jb 0x42302a
mov eax, dword [ebp + 8]
push eax
call fcn.00427ab5
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00527d0f
mov esp, ebp
pop ebp
ret 0x20
push str.read_ok
push 0x5ca2b8
call fcn.00423360
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004230e0
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x42308f
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x42308f
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x422ff4
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x4230ac
or eax, 4
push 0
push eax
call fcn.004145f0
jmp 0x422ff4
push str.write_file_error_
push 0x5ca2b8
call fcn.00423360
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004230e0
mov edx, dword [esi]
mov eax, dword [edx + 4]
jmp 0x422eb0