Function at 0x140029318
Capabilities:
Get file size
Write file on windows

Disassembly:
mov dword [rsp + 8], ecx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2b0
mov rax, qword [0x14009b978]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
mov r12, r8
mov r15, rdx
mov r13d, ecx
mov qword [rsp + 0x60], r8
or rsi, 0xffffffffffffffff
xor eax, eax
mov qword [rsp + 0x50], rax
xor ebx, ebx
mov edi, ebx
lea r14, [0x14009b020]
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x14002938f
test byte [rcx + 0x1c], 4
je 0x14002938f
cmp byte [rcx + 0x19], 5
jb 0x14002938f
lea edx, [rsi + 0x54]
lea r8, [0x14008c238]
mov rcx, qword [rcx + 0x10]
call fcn.1400042fc
lea rcx, str.OutboxLOG.txt
lea rax, str.InboxLOG.txt
test r13d, r13d
cmovne rax, rcx
mov qword [rsp + 0x20], rax
mov r9, r15
lea r8, [0x14008b500]
mov edx, 0x104
lea rcx, [rsp + 0x90]
call fcn.140004280
mov r15d, eax
test eax, eax
jns 0x14002941c
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x1400293fc
test byte [rcx + 0x1c], 4
je 0x1400293fc
cmp byte [rcx + 0x19], 2
jb 0x1400293fc
mov edx, 0x54
mov r9d, eax
lea r8, [0x14008c238]
mov rcx, qword [rcx + 0x10]
call fcn.140004328
mov eax, r15d
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x140029414
movzx edi, r15w
jmp 0x1400296fa
mov edi, r15d
jmp 0x1400296fa
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
mov edx, 0x40000000
mov r8d, 1
lea rcx, [rsp + 0x90]
call fcn.14006b8bc
mov rsi, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x14002948c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x1400296fa
test byte [rcx + 0x1c], 4
je 0x1400296fa
cmp byte [rcx + 0x19], 2
jb 0x1400296fa
lea edx, [rsi + 0x56]
jmp 0x1400296e7
lea rdx, [rsp + 0x50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
jne 0x1400294e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x1400296fa
test byte [rcx + 0x1c], 4
je 0x1400296fa
cmp byte [rcx + 0x19], 2
jb 0x1400296fa
mov edx, 0x56
jmp 0x1400296e7
mov rcx, rsi
cmp qword [rsp + 0x50], rbx
jne 0x1400296a0
mov eax, 0xfeff
mov word [rsp + 0x40], ax
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
mov r8d, 2
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x140029559
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x1400296fa
test byte [rcx + 0x1c], 4
je 0x1400296fa
cmp byte [rcx + 0x19], 2
jb 0x1400296fa
mov edx, 0x57
jmp 0x1400296e7
mov qword [rsp + 0x88], 7
mov qword [rsp + 0x80], rbx
mov word [rsp + 0x70], bx
lea rax, str.Outbox
lea rcx, str.Inbox
test r13d, r13d
cmovne rcx, rax
lea rdx, [rsp + 0x70]
call fcn.14002c27c
nop
mov eax, dword [rsp + 0x80]
lea r8d, [rax + rax]
lea rdx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rdx, qword [rsp + 0x70]
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x14002962b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x14002960d
test byte [rcx + 0x1c], 4
je 0x14002960d
cmp byte [rcx + 0x19], 2
jb 0x14002960d
mov edx, 0x59
mov r9d, eax
lea r8, [0x14008c238]
mov rcx, qword [rcx + 0x10]
call fcn.1400046fc
nop
cmp qword [rsp + 0x88], 8
jb 0x1400296fa
mov rcx, qword [rsp + 0x70]
call fcn.140001180
jmp 0x1400296fa
cmp qword [rsp + 0x88], 8
jb 0x140029640
mov rcx, qword [rsp + 0x70]
call fcn.140001180
mov qword [r12], rsi
mov eax, edi
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.1400018f0
add rsp, 0x2b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r9d, 2
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x140029640
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x1400296fa
test byte [rcx + 0x1c], 4
je 0x1400296fa
cmp byte [rcx + 0x19], 2
jb 0x1400296fa
mov edx, 0x5a
mov r9d, eax
lea r8, [0x14008c238]
mov rcx, qword [rcx + 0x10]
call fcn.1400046fc
test edi, edi
je 0x140029644
cmp qword [r12], 0xffffffffffffffff
je 0x14002971e
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
or qword [r12], 0xffffffffffffffff
test r13d, r13d
jne 0x14002972b
mov dword [0x14009f394], ebx
jmp 0x140029731
mov dword [0x14009f398], ebx
mov dword [rsp + 0x70], edi
mov word [rsp + 0x74], bx
mov r9d, edi
lea r8, [0x14008b4c0]
mov edx, 0xc
lea rcx, [rsp + 0x74]
call fcn.140004280
lea r8, [rsp + 0x74]
test eax, eax
cmovs r8, rbx
neg r13d
sbb edx, edx
add edx, 3
mov qword [rsp + 0x28], r8
mov rax, qword [0x14009f3a0]
mov qword [rsp + 0x20], rax
mov ecx, 1
mov r9d, 0xc0007d3c
lea r8d, [rcx + 1]
call fcn.140069d80
cmp rsi, 0xffffffffffffffff
je 0x140029644
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
test eax, eax
jne 0x140029644
mov rax, qword [0x14009b020]
cmp rax, r14
je 0x140029644
test byte [rax + 0x1c], 4
je 0x140029644
cmp byte [rax + 0x19], 2
jb 0x140029644
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edx, 0x5b
mov r9d, eax
lea r8, [0x14008c238]
mov rcx, qword [0x14009b020]
mov rcx, qword [rcx + 0x10]
call fcn.1400046fc
jmp 0x140029644