Function at 0x470090
Capabilities:
Get file size
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5658a6
mov eax, dword fs:[0]
push eax
mov eax, 0x4228
call fcn.00543120
mov eax, dword [0x5b3680]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x4013]
mov esi, dword [ebp + 0x10]
push 0x1fff
push 0
push eax
mov byte [ebp - 0x4014], 0
call fcn.00531bd0
push 0x1fff
lea eax, [ebp - 0x2013]
mov byte [ebp - 0x2014], 0
push 0
push eax
call fcn.00531bd0
push esi
lea eax, [ebp - 0x421c]
push 0x104
push eax
call fcn.0052c92e
add esp, 0x24
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x470162
lea ecx, [ebp - 0x421c]
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x470140
sub ecx, edx
mov dword [ebp - 0x4220], 0
sar ecx, 1
lea eax, [ecx + ecx]
mov dword [ebp - 0x4224], eax
lea ecx, [ebp - 0x421c]
lea edx, [ecx + 2]
jmp 0x470170
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x470170
sub ecx, edx
sar ecx, 1
push 0
push edi
lea eax, [ecx + ecx]
mov dword [ebp - 0x4224], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x4220], eax
cmp eax, 0xffffffff
je 0x4703e1
test eax, eax
je 0x4703e1
mov esi, dword [ebp - 0x4224]
push 1
lea eax, [esi + 9]
push eax
call fcn.0052d1c5
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x470267
mov dword [ebx], esi
mov eax, dword [ebp - 0x4220]
mov dword [ebx + 4], eax
lea eax, [ebp - 0x421c]
push dword [ebp - 0x4224]
push eax
lea eax, [ebx + 8]
push eax
call fcn.00531580
mov esi, dword [ebp - 0x4224]
add esi, 8
mov word [ebp - 0x4234], 0x124
mov dword [ebp - 0x422e], esi
mov ax, word [ebp - 0x422c]
push esi
mov word [ebp - 0x400c], ax
lea eax, [ebp - 0x400a]
mov dword [ebp - 0x4232], 0x20009304
movq xmm0, qword [ebp - 0x4234]
push ebx
push eax
movq qword [ebp - 0x4014], xmm0
call fcn.00531580
push str.SendFileR:_send_file_name_and_lenth_n
call fcn.0052d67c
add esp, 0x1c
lea eax, [esi + 0xa]
mov esi, dword [ebp + 8]
push 0
push eax
lea eax, [ebp - 0x4014]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x470275
push ebx
call fcn.0052adae
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4703ed
push 0x2000
lea eax, [ebp - 0x2014]
push 0
push eax
call fcn.00531bd0
add esp, 0xc
lea eax, [ebp - 0x2014]
push 0
push 0x1000
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x47025e
cmp dword [ebp - 0x2012], 0x55aa0000
movq xmm0, qword [ebp - 0x2014]
mov ax, word [ebp - 0x200c]
movq qword [ebp - 0x4234], xmm0
mov word [ebp - 0x422c], ax
je 0x470324
push ebx
call fcn.0052adae
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x4228]
call fcn.00402b10
mov dword [ebp - 4], 0
lea eax, [ebp - 0x4228]
push dword [ebp - 0x4232]
push str.Bad_data_type._Received_type:__04Xh.
push eax
call fcn.00415d20
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4228]
call fcn.00402750
xor eax, eax
jmp 0x4703ed
push str.SendFileR:_start_transmit_n
call fcn.0052d67c
add esp, 4
push 0
push 0
push 0
push 0
push 0
push edi
push esi
call dword [sym.imp.MSWSOCK.dll_TransmitFile]
test eax, eax
je 0x47025e
push 0
push 0xa
lea eax, [ebp - 0x2014]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x47025e
cmp dword [ebp - 0x2012], 0x55aa0000
movq xmm0, qword [ebp - 0x2014]
mov ax, word [ebp - 0x200c]
movq qword [ebp - 0x4234], xmm0
mov word [ebp - 0x422c], ax
je 0x4703ce
lea ecx, [ebp - 0x4228]
call fcn.00402b10
mov dword [ebp - 4], 1
lea eax, [ebp - 0x4228]
push dword [ebp - 0x4232]
push str.Bad_data_type._Received_type__04Xh
push eax
call fcn.00415d20
push ebx
call fcn.0052adae
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x47030b
push str.SendFileR:_finish_transmit_n
call fcn.0052d67c
push ebx
call fcn.0052adae
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 - 0x14]
xor ecx, ebp
call fcn.005295e2
mov esp, ebp
pop ebp
ret 0xc