Function at 0x140053139
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.14005300c
mov r15, rax
mov rcx, rax
mov rdx, rsi
call fcn.1400529fc
mov rsi, rax
xor r13d, r13d
cmp rax, 0xffffffffffffffff
je 0x1400531f2
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rbx
mov rcx, r14
call fcn.14004bc2a
lea rdi, [rsp + 0x70]
mov rbp, qword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
mov ebx, ecx
mov r8, qword [r14 + 0x10]
cmp r8, rbx
jbe 0x140053322
sub r8d, ebx
mov rdx, rbx
add rdx, qword [r14]
mov qword [rsp + 0x20], 0
mov rcx, rsi
mov r9, rdi
call rbp
mov ecx, dword [rsp + 0x70]
add ecx, ebx
test eax, eax
jne 0x1400531b5
mov rbx, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov qword [rdi], 0
mov dword [rbx], 0
xor ebp, ebp
mov rcx, qword [rsp + 0x58]
call fcn.140008872
mov rcx, r15
call fcn.140008872
cmp rsi, 0xffffffffffffffff
je 0x140053222
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13, r13
je 0x14005322f
mov rcx, r13
call fcn.14004bb34
test rbp, rbp
jne 0x14005352f
cmp qword [rdi], 0
jne 0x14005352f
mov qword [rdi], 0
mov dword [rbx], 0
cmp qword [r14 + 0x10], 0x40000
ja 0x14005352f
lea rcx, [0x140092edd]
mov rdx, rcx
call qword [sym.imp.USER32.dll_FindWindowA]
test rax, rax
je 0x14005352f
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.14004b6ab
mov r15, rax
xor esi, esi
call fcn.140053928
mov edx, 0
test al, al
je 0x140053409
call fcn.140053ad0
test rax, rax
je 0x140053405
mov rdi, rax
mov edx, 0x28
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
je 0x140053405
mov rsi, rax
mov rcx, rax
mov edx, 1
call qword [0x1400acdb0]
test eax, eax
je 0x1400533fc
mov rcx, rsi
mov rdx, rdi
xor r8d, r8d
call qword [0x1400acdb8]
test eax, eax
je 0x1400533fc
mov dword [rsp + 0x58], 0x18
mov dword [rsp + 0x68], 1
mov qword [rsp + 0x60], rsi
lea rdx, [rsp + 0x58]
jmp 0x140053409
test r12, r12
je 0x140053382
xor r13d, r13d
mov ecx, 1
mov edx, 0x20
xor r8d, r8d
call fcn.1400087f8
mov rbp, rax
lea rdx, [0x1400535a0]
mov rcx, rsi
mov r8, rax
xor r9d, r9d
call fcn.14004e768
mov qword [rbp], rax
call fcn.14004bb2d
mov qword [rbp + 8], rax
mov qword [rbp + 0x10], r12
mov rax, qword [rsp + 0x4e0]
mov qword [rbp + 0x18], rax
xor esi, esi
mov rbx, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
jmp 0x140053201
call fcn.14004bb2d
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, rsi
mov rdx, rdi
mov r8d, 0x400
mov r9, rbx
call r12
test eax, eax
je 0x1400531e8
mov r8d, dword [rsp + 0x54]
mov rcx, r13
mov rdx, rdi
call fcn.140053556
test eax, eax
je 0x14005339b
mov ebp, eax
cmp eax, 0xffffffff
je 0x1400531e8
mov rcx, r13
call fcn.14004bb66
mov rdi, qword [rsp + 0x40]
mov qword [rdi], rax
mov rbx, qword [rsp + 0x38]
mov dword [rbx], ebp
xor r13d, r13d
jmp 0x1400531ff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
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 0x140053445
mov rcx, r15
call fcn.140008872
jmp 0x14005352f
mov qword [rsp + 0x48], rsi
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.14004bc2a
mov rdx, qword [r14]
mov r8, qword [r14 + 0x10]
mov rcx, r12
call fcn.140058720
mov eax, 0x804e50ba
lea rbx, [rsp + 0x70]
mov qword [rbx], rax
mov rcx, r15
call fcn.140069a20
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 0x140053505
mov ebx, dword [r12]
shl rbx, 0x20
bswap rbx
lea eax, [rbx - 1]
cmp eax, 0x3fffb
ja 0x140053505
add rbx, 4
mov edx, 1
mov rcx, rbx
xor r8d, r8d
call fcn.1400087f8
mov rsi, rax
mov rcx, rax
mov rdx, r12
mov r8, rbx
call fcn.140058720
mov rax, qword [rsp + 0x40]
mov qword [rax], rsi
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.140008872
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14005352f
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.1400575f0
mov rax, rbp
add rsp, 0x478
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret