Function at 0x4052d0
Capabilities:
Get file size
Read and send data from client to server
Read file on windows
Send data

Disassembly:
sub esp, 0x21c
push ebx
push ebp
push esi
mov ebx, dword [esp + 0x22c]
mov esi, ecx
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x128]
mov eax, dword [esi + 0x128]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0
mov ecx, dword [eax + 0xf8]
push ecx
push ebx
push str._d_s
push edx
call edi
add esp, 0x10
lea eax, [esp + 0x128]
push eax
push 0x7b
call fcn.00406170
add esp, 4
lea ecx, [esp + 0x28]
push eax
push ecx
call edi
add esp, 0xc
lea edx, [esp + 0x24]
mov ecx, esi
push edx
push 0
push 0xc
push 0x437
call fcn.00425baa
mov eax, dword [esi + 0x128]
mov ecx, dword [eax + 0xf8]
mov edx, dword [eax + 0xf0]
push ecx
push ebx
push edx
lea eax, [esp + 0x30]
push str._sUpload_d_s
push eax
call edi
mov eax, dword [esi + 0x158]
xor edx, edx
mov ecx, dword [esi + 0xb4]
add esp, 0x14
lea eax, [eax + eax*4]
push 0
lea eax, [eax + eax*4]
shl eax, 2
div dword [esi + 0x154]
push eax
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 3
push 0
push 1
lea edx, [esp + 0x38]
push SysReAllocStringLen
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40541a
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
je 0x40540d
push ebp
call fcn.00421eb6
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x4053fc
lea eax, [esp + 0x20]
push 0
push eax
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4053f6
mov dword [esp + 0x10], eax
cmp ebp, dword [esp + 0x20]
je 0x405411
push edi
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405422
mov ebx, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405422
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mov eax, dword [esi + 0x150]
xor edi, edi
cmp eax, edi
je 0x405432
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x10]
cmp ebx, edi
je 0x40552a
cmp eax, edi
je 0x40551d
mov edx, dword [esi + 0x134]
lea ecx, [esp + 0x128]
push ecx
push edx
call dword [sym.imp.WININET.dll_FtpDeleteFileA]
mov ecx, dword [esi + 0x134]
push edi
push 2
lea eax, [esp + 0x130]
push 0x40000000
push eax
push ecx
call dword [sym.imp.WININET.dll_FtpOpenFileA]
mov ecx, eax
cmp ecx, edi
mov dword [esp + 0x18], ecx
je 0x405519
xor ebx, ebx
mov eax, ebp
mov edi, 0x1000
sub eax, ebx
cmp eax, edi
jae 0x405497
mov edi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
push edi
lea edx, [ebx + eax]
push edx
push ecx
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
je 0x405500
cmp edi, dword [esp + 0x1c]
jne 0x405500
mov eax, dword [esi + 0x150]
test eax, eax
jne 0x405500
mov eax, dword [esi + 0x158]
xor edx, edx
add eax, edi
push 0
mov dword [esi + 0x158], eax
add ebx, edi
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
div dword [esi + 0x154]
push eax
mov eax, dword [esi + 0xb4]
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp ebx, ebp
je 0x405508
mov ecx, dword [esp + 0x18]
jmp 0x405488
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [esp + 0x14]
jmp 0x40551d
mov dword [esp + 0x10], edi
push ebx
call fcn.00421edf
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret 4