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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x490
mov rax, qword [0x14020f568]
xor rax, rsp
mov qword [rsp + 0x470], rax
xor ebp, ebp
xor eax, eax
mov r12, rdx
mov qword [rsp + 0x30], rbp
lea r13d, [rbp + 1]
xor r9d, r9d
mov edx, 0x80000000
mov r8d, r13d
mov dword [rsp + 0x28], 0x80
mov rsi, rcx
mov dword [rsp + 0x40], ebp
mov dword [rsp + 0x44], ebp
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140004a37
xor eax, eax
jmp 0x140004c67
mov qword [rsp + 0x4d0], rbx
lea rdx, [rsp + 0x40]
mov rcx, rax
mov qword [rsp + 0x488], r14
mov qword [rsp + 0x480], r15
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [rsp + 0x40]
mov dword [rsp + 0x48], eax
mov r15d, eax
mov dword [rsp + 0x4c], ecx
mov rbx, qword [rsp + 0x48]
mov rcx, rbx
call fcn.140007010
mov r8, rbx
xor edx, edx
mov rcx, rax
mov r14, rax
call fcn.140159440
lea r9, [rsp + 0x44]
mov r8d, r15d
mov rdx, r14
mov rcx, rdi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
test eax, eax
cmove r13d, ebp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13d, r13d
jne 0x140004b44
mov ebx, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rsp + 0x50]
xor r9d, r9d
mov rcx, r12
mov r8d, ebx
mov qword [rsp + 0x50], 0x66778812
lea rdi, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x140004b2c
cmp eax, 0xffffffff
je 0x140004b2c
movsxd rcx, eax
add ebp, eax
sub ebx, eax
add rdi, rcx
cmp ebp, 0x10
jge 0x140004b11
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jne 0x140004ae5
jmp 0x140004b2c
mov r8d, dword [rsp + 0x54]
test r8d, r8d
jle 0x140004b35
mov r9d, r8d
xor edx, edx
mov rcx, r12
call fcn.140006a90
test eax, eax
jne 0x140004b35
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, r14
call fcn.140007018
xor eax, eax
jmp 0x140004c4f
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x404
call fcn.140159440
lea rcx, [rsp + 0x60]
mov r8, rsi
mov edx, 0x400
call fcn.140157dd8
lea esi, [r15 + 0x404]
mov dword [rsp + 0x460], r15d
lea eax, [rsi + 1]
mov ecx, eax
mov edi, eax
call fcn.140007010
mov r8d, edi
xor edx, edx
mov rcx, rax
mov r15, rax
call fcn.140159440
lea rdx, [rsp + 0x60]
mov rcx, r15
mov r8d, 0x404
call fcn.140157510
lea rcx, [r15 + 0x404]
mov r8, rbx
mov rdx, r14
call fcn.140157510
mov dword [rsp + 0x54], esi
mov ebx, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rsp + 0x50]
mov r8d, ebx
xor r9d, r9d
mov rcx, r12
mov dword [rsp + 0x50], 0x66778807
lea rsi, [rsp + 0x50]
mov edi, ebp
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x140004c30
cmp eax, 0xffffffff
je 0x140004c30
movsxd rcx, eax
add edi, eax
sub ebx, eax
add rsi, rcx
cmp edi, 0x10
jge 0x140004c14
xor r9d, r9d
mov r8d, ebx
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jne 0x140004be8
jmp 0x140004c30
mov r8d, dword [rsp + 0x54]
test r8d, r8d
jle 0x140004c3c
mov r9d, r8d
mov rdx, r15
mov rcx, r12
call fcn.140006a90
test eax, eax
jne 0x140004c3c
mov rcx, r12
mov r13d, ebp
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, r14
call fcn.140007018
mov rcx, r15
call fcn.140007018
mov eax, r13d
mov r14, qword [rsp + 0x488]
mov rbx, qword [rsp + 0x4d0]
mov r15, qword [rsp + 0x480]
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.140157300
add rsp, 0x490
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret