Function at 0x14004ad40
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x20258
call fcn.1400a5130
sub rsp, rax
mov rax, qword [0x14014dcf0]
xor rax, rsp
mov qword [rsp + 0x20240], rax
cmp dword [rsp + 0x202c0], 0
mov r12d, dword [rsp + 0x202c8]
mov rdi, r9
mov qword [rsp + 0x38], r9
mov rbp, r8
mov r13, rdx
mov r15, rcx
je 0x14004ad9c
test r12d, r12d
je 0x14004ad9c
mov byte [0], 0
lea rdx, [r8 + 0x2a90]
mov esi, pe_nt_image_headers64
lea rcx, [rsp + 0x140]
mov r8d, esi
call fcn.1400a4990
mov ecx, dword [rbp]
call fcn.1400158d0
lea rdx, [rsp + 0x40]
xor r9d, r9d
mov r8d, eax
mov rcx, r15
call fcn.14003f870
test eax, eax
je 0x14004af60
nop dword [rax + rax]
lea rdx, [rbp + 0x2a90]
xor r9d, r9d
mov r8d, esi
mov rcx, r15
call fcn.14003f870
test eax, eax
je 0x14004af60
mov ecx, dword [rbp]
lea r8, [rbp + 0xc]
lea rdx, [rsp + 0x40]
call fcn.140015710
mov ebx, eax
test eax, eax
jne 0x14004af65
lea rdx, [rbp + 0x2a90]
mov rcx, rbp
call fcn.140015890
test eax, eax
je 0x14004b029
test r12d, r12d
je 0x14004ae3d
add rdi, 0x20000
jmp 0x14004ae3f
xor edi, edi
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004b03e
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x240]
mov r8d, 0x20000
mov rcx, r13
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14004b03e
cmp dword [rsp + 0x30], 0x200
jb 0x14004b033
lea rdx, [rsp + 0x440]
xor r9d, r9d
mov r8d, 0x1fe00
mov rcx, r15
mov dword [rsp + 0x20], 1
call fcn.14003f400
lea rcx, [rsp + 0x440]
mov r8, rbp
mov edx, 0x1fe00
call fcn.140014c30
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004b03e
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x240]
mov r8d, 0x20000
mov rcx, r13
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14004b03e
cmp dword [rsp + 0x30], 0x20000
jne 0x14004af60
test r12d, r12d
jne 0x14004afde
cmp dword [rsp + 0x202c0], r12d
jne 0x14004afde
mov ecx, dword [rbp]
mov r12d, 1
call fcn.1400158d0
lea rdx, [rsp + 0x40]
xor r9d, r9d
mov r8d, eax
mov rcx, r15
call fcn.14003f870
mov rdi, qword [rsp + 0x38]
test eax, eax
jne 0x14004ade0
mov ebx, 0x1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdi, [rsp + 0x40]
mov rcx, rsi
mov r11d, eax
xor eax, eax
lea rdx, [rsp + 0x40]
rep stosb byte [rdi], al
mov r8, rsi
mov byte [rdx], al
inc rdx
dec r8
jne 0x14004af82
lea rdi, [rsp + 0x140]
mov rcx, rsi
lea rdx, [rsp + 0x140]
rep stosb byte [rdi], al
mov byte [rdx], al
inc rdx
dec rsi
jne 0x14004afa1
test ebx, ebx
je 0x14004afb8
mov ecx, r11d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
mov rcx, qword [rsp + 0x20240]
xor rcx, rsp
call fcn.1400a4e70
add rsp, 0x20258
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rcx, [rbp + 0x2a90]
lea rdx, [rsp + 0x140]
mov r8, rsi
call fcn.1400a4990
mov ecx, dword [rbp]
lea r8, [rbp + 0xc]
lea rdx, [rbp + 0x2990]
call fcn.140015710
mov ebx, eax
test eax, eax
jne 0x14004af65
lea rdx, [rbp + 0x2a90]
mov rcx, rbp
call fcn.140015890
test eax, eax
jne 0x14004af65
mov ebx, 0x1b
jmp 0x14004af65
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, 1
jmp 0x14004af65