Function at 0x1800040e0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbx
sub rsp, 0xe0
mov ebx, dword [rcx + 0xc]
mov rcx, qword [rcx + 0x10]
shr ebx, 1
and ebx, 1
test rcx, rcx
je 0x18000458c
xor eax, eax
xor r9d, r9d
mov qword [rsp + 0x30], rax
mov edx, 0x80000000
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 3
lea r8d, [rax + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x90], rax
cmp rax, 0xffffffffffffffff
je 0x18000458c
xor ecx, ecx
mov edx, 0x11300
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x70], rax
mov rdx, rax
test rax, rax
je 0x180004578
xor r10d, r10d
mov qword [rsp + 0xd8], rbp
mov qword [rsp + 0xd0], rsi
mov ebp, r10d
mov qword [rsp + 0xc8], rdi
mov edi, r10d
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xb8], r13
lea r13, [rax + 0x1000]
lea r8, [r13 + 0x100]
mov qword [rsp + 0xb0], r14
lea r9, [r8 + 0x200]
mov qword [rsp + 0xa8], r15
mov rcx, r13
mov qword [rsp + 0x88], r9
mov eax, r10d
mov qword [rsp + 0x68], r10
mov rsi, r9
mov qword [rsp + 0x78], rcx
lea r9, [0x180000000]
mov qword [rsp + 0x80], r8
mov r12, r13
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x108], r10d
lea r15d, [r10 + 2]
mov qword [rsp + 0x60], rcx
mov r14, r8
mov dword [rsp + 0x44], r10d
mov dword [rsp + 0x48], r10d
mov dword [rsp + 0x100], eax
mov qword [rsp + 0x50], rbx
test eax, eax
jne 0x18000452d
cmp r12, r13
jb 0x180004260
mov rcx, qword [rsp + 0x90]
lea r9, [rsp + 0x58]
mov r8d, 0x1000
mov qword [rsp + 0x20], r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18000424f
mov r12, qword [rsp + 0x70]
mov r13d, dword [rsp + 0x58]
add r13, r12
lea r9, [0x180000000]
cmp r12, r13
jb 0x180004260
xor r8b, r8b
jmp 0x180004268
movzx r8d, byte [r12]
inc r12
movzx eax, r8b
movzx edx, byte [rax + r9 + 0x256c0]
mov eax, r15d
lea rax, [rax + rax*8]
add rax, rdx
movzx r15d, byte [rax + r9 + 0x25650]
mov byte [rsp + 0xf8], r15b
cmp r15b, 0xff
je 0x1800042a4
test r15b, r15b
jns 0x1800042a4
test rbx, rbx
je 0x18000452d
movzx eax, byte [rax + r9 + 0x257c0]
dec eax
cmp eax, 9
ja case.default.0x1800042c5
cdqe
mov ecx, dword [r9 + rax*4 + 0x4644]
add rcx, r9
jmp rcx
mov rcx, qword [rsp + 0x78]
xor r10d, r10d
mov qword [rsp + 0x60], rcx
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x108], r10d
jmp 0x180004509
mov ecx, dword [rsp + 0x108]
mov eax, dword [rsp + 0x100]
cmp ecx, 0xff
jb 0x18000430c
mov dword [rsp + 0x40], 1
xor r10d, r10d
jmp 0x180004510
mov r9, qword [rsp + 0x60]
inc ecx
mov dword [rsp + 0x108], ecx
mov byte [r9], r8b
inc r9
mov qword [rsp + 0x60], r9
xor r10d, r10d
lea r9, [0x180000000]
jmp 0x180004510
mov ecx, dword [rsp + 0x108]
test ecx, ecx
je 0x180004371
cmp dword [rsp + 0x40], 0
jne 0x180004371
mov eax, ecx
mov r8d, 1
mov rcx, qword [rsp + 0x78]
mov rdx, rcx
mov byte [rax + rcx], 0
mov rcx, qword [rsp + 0xf0]
call fcn.180003c50
mov qword [rsp + 0x68], rax
jmp 0x1800044ff
xor r10d, r10d
mov qword [rsp + 0x68], r10
jmp 0x180004509
mov r14, qword [rsp + 0x80]
xor r10d, r10d
mov dword [rsp + 0x44], r10d
mov ebp, r10d
mov byte [r14], r8b
inc r14
inc ebp
jmp 0x180004509
xor r10d, r10d
cmp ebp, 0x1ff
jb 0x180004391
mov dword [rsp + 0x44], 1
jmp 0x180004509
test ebp, ebp
je 0x1800043d8
nop word [rax + rax]
movsx rcx, byte [r14 - 1]
cmp byte [rcx + r9 + 0x256c0], 8
jne 0x1800043d8
dec r14
add ebp, 0xffffffff
jne 0x1800043c0
mov rsi, qword [rsp + 0x88]
xor r10d, r10d
mov dword [rsp + 0x48], r10d
mov edi, r10d
jmp 0x180004509
mov eax, dword [rsp + 0x100]
cmp edi, 0xffff
jb 0x18000440f
mov dword [rsp + 0x48], 1
xor r10d, r10d
jmp 0x180004510
mov byte [rsi], r8b
inc edi
inc rsi
xor r10d, r10d
jmp 0x180004510
test edi, edi
je case.0x1800042c5.10
nop dword [rax]
nop word [rax + rax]
movsx rax, byte [rsi - 1]
cmp byte [rax + r9 + 0x256c0], 8
jne case.0x1800042c5.10
dec rsi
add edi, 0xffffffff
jne 0x180004430
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x18000461a
cmp dword [rsp + 0x44], 0
jne 0x18000461a
cmp dword [rsp + 0x48], 0
jne 0x18000461a
mov rdx, qword [rsp + 0x80]
mov r8d, 1
mov eax, ebp
mov byte [rax + rdx], 0
mov eax, edi
mov byte [rax + rdx + 0x200], 0
call fcn.180003eb0
mov rbx, rax
test rax, rax
je 0x1800044fa
test edi, edi
je 0x1800045c7
mov rax, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rax]
call fcn.180001e30
mov r15, rax
test rax, rax
je 0x180004595
mov rdx, qword [rbx + 0x40]
test rdx, rdx
je 0x1800044e2
mov rax, qword [rsp + 0xf0]
mov r8d, 1
mov rcx, qword [rax]
call fcn.180003520
mov rax, qword [rsp + 0xf0]
mov qword [rbx + 0x40], r15
movzx r15d, byte [rsp + 0xf8]
inc dword [rax + 8]
mov rbx, qword [rsp + 0x50]
xor r10d, r10d
lea r9, [0x180000000]
mov eax, dword [rsp + 0x100]
cmp r15b, 0xff
je 0x18000452d
mov rdx, qword [rsp + 0x70]
movzx r15d, r15b
btr r15d, 7
test r10b, r10b
je 0x180004213
mov rcx, qword [rsp + 0x70]
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r15, qword [rsp + 0xa8]
mov r14, qword [rsp + 0xb0]
mov r13, qword [rsp + 0xb8]
mov r12, qword [rsp + 0xc0]
mov rdi, qword [rsp + 0xc8]
mov rsi, qword [rsp + 0xd0]
mov rbp, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0x90]
cmp rcx, 0xffffffffffffffff
je 0x18000458c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0xe0
pop rbx
ret
mov rbx, qword [rsp + 0x50]
lea r9, [0x180000000]
movzx r15d, byte [rsp + 0xf8]
xor r10d, r10d
test rbx, rbx
jne 0x180004509
mov eax, 1
mov dword [rsp + 0x100], eax
jmp 0x180004510
mov rdx, qword [rax + 0x40]
test rdx, rdx
je 0x180004602
mov rax, qword [rsp + 0xf0]
mov r8d, 1
mov rcx, qword [rax]
call fcn.180003520
mov rax, qword [rsp + 0xf0]
xor r10d, r10d
mov qword [rbx + 0x40], r10
mov rbx, qword [rsp + 0x50]
inc dword [rax + 8]
jmp 0x180004502
mov rax, qword [rsp + 0xf0]
xor r10d, r10d
mov rbx, qword [rsp + 0x50]
inc dword [rax + 8]
jmp 0x180004502
mov eax, dword [rsp + 0x100]
test rbx, rbx
mov ecx, 1
cmove eax, ecx
xor r10d, r10d
mov dword [rsp + 0x100], eax
jmp 0x180004510
xor r10d, r10d
jmp 0x180004509