Function at 0x140053f20
Capabilities:
Allocate or change rwx memory
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x260
xor ebx, ebx
mov rbp, r8
mov rdi, rdx
mov dword [rsp + 0x298], ebx
mov rsi, rcx
call fcn.140041490
cmp eax, 2
mov rcx, rsi
jle 0x140054118
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 7]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140054035
test rax, rax
je 0x140054035
lea rax, [rsp + 0x44]
lea rcx, [rsp + 0x40]
cmp ebp, 0x100000
cmovae rcx, rax
mov dword [rsp + 0x40], 0x100000
mov dword [rsp + 0x44], ebp
mov r13d, dword [rcx]
lea r9d, [rbx + 4]
mov r8d, 0x1000
mov rdx, r13
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rcx, r12
mov rbp, rax
test rax, rax
jne 0x14005403c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140054035
cmp byte [0x1401148b0], bl
je 0x140054026
call fcn.14003e110
cmp eax, 3
jg 0x140054026
lea r9d, [rbp + 3]
lea r8d, [rbp + 0x49]
lea rdx, str.d:_b_build_slavechrome_official_build_src_base_scoped_handle_win.h
lea rcx, [rsp + 0x58]
lea ebx, [rbp + 4]
call fcn.1400403f0
lea rdx, str.Check_failed:_false.
lea rcx, [rax + 8]
call fcn.140005bd0
test bl, 4
je 0x140054035
lea rcx, [rsp + 0x58]
call fcn.14003feb0
xor al, al
jmp 0x140054177
lea r9, [rsp + 0x298]
mov r8d, r13d
mov rdx, rax
mov rsi, rbx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005409f
nop dword [rax]
mov ecx, dword [rsp + 0x298]
test ecx, ecx
je 0x14005409f
test rdi, rdi
je 0x14005407c
cmp rsi, rdi
mov eax, ebx
setb al
test eax, eax
je 0x14005409f
add rsi, rcx
lea r9, [rsp + 0x298]
mov r8d, r13d
mov rdx, rbp
mov rcx, r12
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140054060
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140054175
cmp byte [0x1401148b0], bl
je 0x140054104
call fcn.14003e110
cmp eax, 3
jg 0x140054104
mov ebx, 8
lea rdx, str.d:_b_build_slavechrome_official_build_src_base_scoped_handle_win.h
lea rcx, [rsp + 0x158]
lea r9d, [rbx - 5]
lea r8d, [rbx + 0x41]
call fcn.1400403f0
lea rdx, str.Check_failed:_false.
lea rcx, [rax + 8]
call fcn.140005bd0
test bl, 8
je 0x140054175
lea rcx, [rsp + 0x158]
call fcn.14003feb0
jmp 0x140054175
xor edx, edx
lea r8d, [rdx + 9]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
je 0x140054035
lea rax, fcn.140058b60
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rax
call fcn.140058300
test rdi, rdi
jne 0x140054160
mov edi, dword [rax + 0x50]
test rdi, rdi
je 0x14005416c
nop dword [rax + rax]
movzx eax, byte [rbx + rsi]
add rbx, rbp
cmp rbx, rdi
jb 0x140054160
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, 1
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret