Function at 0x180012090
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov r12, rdx
mov rsi, rcx
test rdx, rdx
jne 0x1800120c9
or rax, 0xffffffffffffffff
jmp 0x1800123e3
mov rcx, r12
call fcn.180019920
test eax, eax
je 0x1800120c0
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
mov qword [rsp + 0x58], rax
cmp rax, rbx
je 0x180012399
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
mov dword [rsp + 0x4c], eax
or r13d, 0xffffffff
cmp eax, r13d
je 0x18001237e
xor edi, edi
mov dword [rsp + 0x44], edi
mov dword [rsp + 0x48], r13d
xor ebx, ebx
mov dword [rsp + 0x40], ebx
lea rcx, [0x180044b30]
test ebx, ebx
jne 0x18001235a
test edx, edx
je 0x1800123c0
mov dword [rsp + 0xd8], ebx
lea rax, [rsp + 0x4c]
cmp edx, 0x1fffe
cmovae rax, rcx
mov ecx, dword [rax]
call fcn.18001a164
mov r14, rax
lea rcx, [rsp + 0x4c]
cmp dword [rsp + 0x4c], 0x1fffe
lea rax, [0x180044b30]
cmovae rcx, rax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xd8]
mov r8d, dword [rcx]
mov rdx, r14
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180012349
test edi, edi
jne 0x18001226b
mov dword [rsp + 0x44], 1
mov ebx, dword [rsp + 0xd8]
add rbx, 0x11c
mov qword [rsp + 0x68], rbx
mov rcx, rbx
call fcn.18001a164
mov rdi, rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.18001c6c0
mov dword [rdi], 0x102
mov dword [rdi + 4], ebx
mov ecx, dword [rsp + 0x4c]
mov dword [rdi + 0x10c], ecx
mov edx, dword [rsp + 0xd8]
mov dword [rdi + 0x114], edx
lea rcx, [rdi + 8]
mov r8d, 0x104
mov rdx, r12
call fcn.180019730
mov r8d, dword [rdi + 0x114]
mov rdx, r14
lea rcx, [rdi + 0x118]
call fcn.18001c1a0
mov r8d, dword [rdi + 0x114]
lea rdx, [rdi + 0x118]
mov ecx, r13d
call fcn.180015f50
mov dword [rsp + 0x48], eax
mov dword [rdi + 0x110], eax
jmp 0x1800122e0
mov ebx, dword [rsp + 0xd8]
add rbx, 0x18
mov qword [rsp + 0x70], rbx
mov rcx, rbx
call fcn.18001a164
mov rdi, rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.18001c6c0
mov dword [rdi], 0x104
mov dword [rdi + 4], ebx
mov ecx, dword [rsp + 0xd8]
mov dword [rdi + 0x10], ecx
xor edx, edx
mov ecx, dword [rsp + 0x4c]
cmp dword [rsp + 0xd8], ecx
sete dl
mov dword [rdi + 8], edx
mov r8d, dword [rdi + 0x10]
mov rdx, r14
lea rcx, [rdi + 0x14]
call fcn.18001c1a0
mov r8d, dword [rdi + 0x10]
lea rdx, [rdi + 0x14]
mov ecx, r13d
call fcn.180015f50
mov dword [rsp + 0x48], eax
mov dword [rdi + 0xc], eax
mov r9d, 1
mov r13d, eax
mov r8d, r9d
mov rdx, rdi
mov rcx, rsi
call fcn.180011440
mov dword [rsp + 0x40], eax
mov ebx, eax
test eax, eax
jne 0x180012345
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x18]
mov ebx, eax
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x180012345
mov rcx, qword [rsi + 0x558]
test rcx, rcx
je 0x180012345
mov ebx, dword [rcx + 8]
mov dword [rsp + 0x40], ebx
lea edx, [rax + 8]
call fcn.180019d80
mov qword [rsi + 0x558], 0
mov eax, dword [rsp + 0xd8]
sub dword [rsp + 0x4c], eax
mov edi, dword [rsp + 0x44]
mov rcx, r14
call fcn.180019d80
mov edx, dword [rsp + 0x4c]
jmp 0x18001214f
lea rcx, [rsi + 0x530]
mov rax, qword [rcx]
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], r12
mov r9d, ebx
lea r8, str.SendFile:_Error__d_sending_file__s_to_server___BytesToSend__d
xor edx, edx
call qword [rax + reloc.WS2_32.dll_recv]
jmp 0x1800123c0
lea rcx, [rsi + 0x530]
mov rax, qword [rcx]
mov r9, r12
lea r8, str.SendFile:_Invalid_file_size_for_file__s_
xor edx, edx
call qword [rax + reloc.WS2_32.dll_recv]
jmp 0x1800123c0
lea rdi, [rsi + 0x530]
mov rsi, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, str.SendFile:_Unable_to_open_file__s___d__
xor edx, edx
mov rcx, rdi
call qword [rsi + reloc.WS2_32.dll_recv]
nop
jmp 0x1800123cb
cmp r15, 0xffffffffffffffff
je 0x1800123db
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x1800123e1
mov eax, ebx
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret