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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x478
mov r12, r9
mov rbx, r8
mov rdi, rdx
mov r14, rcx
mov rax, qword [0x1400ab520]
xor rax, rsp
mov qword [rsp + 0x470], rax
lea rsi, [rsp + 0x58]
mov qword [rsi], 0
call fcn.140053100
mov r15, rax
mov rcx, rax
mov rdx, rsi
call fcn.140052adc
mov rbp, rax
xor r13d, r13d
cmp rax, 0xffffffffffffffff
je 0x1400532f0
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rbx
mov rcx, r14
call fcn.14004bc0e
lea rdi, [rsp + 0x70]
mov rsi, qword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
mov ebx, ecx
mov r8, qword [r14 + 0x10]
cmp r8, rbx
jbe 0x140053420
sub r8d, ebx
mov rdx, rbx
add rdx, qword [r14]
mov qword [rsp + 0x20], 0
mov rcx, rbp
mov r9, rdi
call rsi
mov ecx, dword [rsp + 0x70]
add ecx, ebx
test eax, eax
jne 0x1400532b3
mov rbx, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov qword [rdi], 0
mov dword [rbx], 0
xor esi, esi
mov rcx, qword [rsp + 0x58]
call fcn.1400088de
mov rcx, r15
call fcn.1400088de
cmp rbp, 0xffffffffffffffff
je 0x140053320
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13, r13
je 0x14005332d
mov rcx, r13
call fcn.14004bb18
test rsi, rsi
jne 0x140053635
cmp qword [rdi], 0
jne 0x140053635
mov qword [rdi], 0
mov dword [rbx], 0
cmp qword [r14 + 0x10], 0x40000
ja 0x140053635
lea rcx, [0x140092ebd]
mov rdx, rcx
call qword [sym.imp.USER32.dll_FindWindowA]
test rax, rax
je 0x140053635
mov r13, rax
mov qword [rsp + 0x40], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, str.PageantRequest_08x
mov edx, eax
call fcn.14004b68f
mov r15, rax
xor ebp, ebp
call fcn.140053a30
mov edx, 0
test al, al
je 0x14005350f
call fcn.140053bd8
test rax, rax
je 0x14005350b
mov rdi, rax
mov edx, 0x28
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
je 0x14005350b
mov rbp, rax
mov rcx, rax
mov edx, 1
call qword [0x1400acdb0]
test eax, eax
je 0x140053502
mov rcx, rbp
mov rdx, rdi
xor r8d, r8d
call qword [0x1400acdb8]
test eax, eax
je 0x140053502
mov dword [rsp + 0x58], 0x18
mov dword [rsp + 0x68], 1
mov qword [rsp + 0x60], rbp
lea rdx, [rsp + 0x58]
jmp 0x14005350f
test r12, r12
je 0x140053488
xor r13d, r13d
mov ecx, 1
mov edx, 0x28
xor r8d, r8d
call fcn.140008864
mov rsi, rax
lea rdx, [0x1400536a6]
mov rcx, rbp
mov r8, rax
xor r9d, r9d
call fcn.14004e800
mov qword [rsi], rax
mov qword [rsi + 8], rbp
call fcn.14004bb11
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], r12
mov rax, qword [rsp + 0x4e0]
mov qword [rsi + 0x20], rax
mov rbp, 0xffffffffffffffff
mov rbx, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
jmp 0x1400532ff
call fcn.14004bb11
mov r13, rax
lea rdi, [rsp + 0x70]
lea rbx, [rsp + 0x54]
mov r12, qword [sym.imp.KERNEL32.dll_ReadFile]
mov qword [rsp + 0x20], 0
mov rcx, rbp
mov rdx, rdi
mov r8d, 0x400
mov r9, rbx
call r12
test eax, eax
je 0x1400532e6
mov r8d, dword [rsp + 0x54]
mov rcx, r13
mov rdx, rdi
call fcn.14005365c
test eax, eax
je 0x1400534a1
mov esi, eax
cmp eax, 0xffffffff
je 0x1400532e6
mov rcx, r13
call fcn.14004bb4a
mov rdi, qword [rsp + 0x40]
mov qword [rdi], rax
mov rbx, qword [rsp + 0x38]
mov dword [rbx], esi
xor r13d, r13d
jmp 0x1400532fd
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor ebp, ebp
xor edx, edx
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0x40000
mov rcx, 0xffffffffffffffff
mov r8d, 4
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rdi, rax
inc rax
cmp rax, 1
ja 0x14005354b
mov rcx, r15
call fcn.1400088de
jmp 0x140053635
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r12, rax
mov rcx, r14
call fcn.14004bc0e
mov rdx, qword [r14]
mov r8, qword [r14 + 0x10]
mov rcx, r12
call fcn.140058840
mov eax, 0x804e50ba
lea rbx, [rsp + 0x70]
mov qword [rbx], rax
mov rcx, r15
call fcn.140069b40
inc eax
mov dword [rbx + 8], eax
mov qword [rbx + 0x10], r15
mov rcx, r13
mov edx, 0x4a
xor r8d, r8d
mov r9, rbx
call qword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jle 0x14005360b
mov ebx, dword [r12]
shl rbx, 0x20
bswap rbx
lea eax, [rbx - 1]
cmp eax, 0x3fffb
ja 0x14005360b
add rbx, 4
mov edx, 1
mov rcx, rbx
xor r8d, r8d
call fcn.140008864
mov rbp, rax
mov rcx, rax
mov rdx, r12
mov r8, rbx
call fcn.140058840
mov rax, qword [rsp + 0x40]
mov qword [rax], rbp
mov rax, qword [rsp + 0x38]
mov dword [rax], ebx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
call fcn.1400088de
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140053635
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.140057710
mov rax, rsi
add rsp, 0x478
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret