Function at 0x140054748
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4d0]
sub rsp, 0x5d0
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0x4c0], rax
mov qword [rsp + 0x60], r8
lea rcx, [rbp + 0x1b0]
mov rbx, rdx
mov qword [rsp + 0x68], r9
xor eax, eax
xor edx, edx
mov r8d, 0x208
mov r14d, eax
call fcn.14013b230
mov edi, 0x100
lea rcx, [rbp - 0x60]
mov r8d, edi
xor edx, edx
call fcn.14013b230
mov r8d, edi
lea rcx, [rbp + 0x3c0]
xor edx, edx
call fcn.14013b230
xor edx, edx
lea r8d, [rdi + 4]
lea rcx, [rbp + 0xa0]
call fcn.14013b230
or rax, 0xffffffffffffffff
xor edi, edi
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], edi
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x54], eax
lea r8d, [rax + 2]
mov dword [rsp + 0x50], eax
mov r15d, eax
mov dword [rsp + 0x4c], eax
mov r12d, eax
mov dword [rsp + 0x20], 3
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140054cbb
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], edi
lea r8d, [rdi + 0xc]
mov qword [rsp + 0x20], rdi
lea rdx, [rbp - 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140054ca8
cmp dword [rsp + 0x40], 0xc
jne 0x140054ca8
movzx ecx, byte [rbp - 0x6c]
lea r8d, [rdi + 4]
movzx eax, word [rbp - 0x6c]
lea rdx, str.OTTO
shl cx, 8
shr ax, 8
or cx, ax
mov word [rbp - 0x6c], cx
lea rcx, [rbp - 0x70]
call fcn.140120154
test eax, eax
jne 0x140054ca8
cmp di, word [rbp - 0x6c]
movzx ebx, di
jae 0x140054ca8
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], edi
mov r8d, 0x10
mov qword [rsp + 0x20], rdi
lea rdx, [rbp - 0x80]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400548d9
cmp dword [rsp + 0x40], edi
je 0x1400548d9
mov r8d, 4
lea rdx, [0x14017a8ac]
lea rcx, [rbp - 0x80]
call fcn.140120154
test eax, eax
je 0x1400548e2
inc bx
cmp bx, word [rbp - 0x6c]
jmp 0x14005488e
movzx eax, byte [rbp - 0x74]
xor r9d, r9d
mov edx, dword [rbp - 0x74]
xor r8d, r8d
shl ax, 8
movzx ecx, ax
movzx eax, word [rbp - 0x74]
shr eax, 8
or ecx, eax
shr edx, 0x10
movzx eax, dl
shl ecx, 8
or ecx, eax
mov eax, edx
shr eax, 8
shl ecx, 8
or ecx, eax
movzx eax, byte [rbp - 0x78]
shl ax, 8
movzx edx, ax
movzx eax, word [rbp - 0x78]
shr eax, 8
or edx, eax
mov dword [rbp - 0x74], ecx
mov ecx, dword [rbp - 0x78]
shr ecx, 0x10
shl edx, 8
movzx eax, cl
or edx, eax
mov eax, ecx
shr eax, 8
mov rcx, rsi
shl edx, 8
or edx, eax
mov dword [rbp - 0x78], edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140054ca8
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], edi
mov r8d, 6
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x44]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140054ca8
cmp dword [rsp + 0x40], edi
je 0x140054ca8
movzx edx, byte [rsp + 0x44]
movzx eax, word [rsp + 0x44]
movzx r8d, byte [rsp + 0x46]
movzx ecx, byte [rsp + 0x48]
shr ax, 8
shl dx, 8
or dx, ax
shl r8w, 8
movzx eax, word [rsp + 0x46]
shr ax, 8
or r8w, ax
shl cx, 8
movzx eax, word [rsp + 0x48]
shr ax, 8
or cx, ax
mov word [rsp + 0x44], dx
mov word [rsp + 0x46], r8w
mov word [rsp + 0x48], cx
test dx, dx
jne 0x140054ca8
cmp r8w, di
je 0x140054ca8
mov ebx, edi
jbe 0x140054ae4
mov r14d, 1
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], edi
mov r8d, 0xc
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140054abf
cmp dword [rsp + 0x40], edi
je 0x140054abf
movzx ecx, byte [rsp + 0x76]
movzx eax, word [rsp + 0x76]
movzx r8d, byte [rsp + 0x78]
shr ax, 8
shl cx, 8
or cx, ax
shl r8w, 8
movzx eax, word [rsp + 0x7a]
movzx edx, cx
movzx ecx, byte [rsp + 0x7a]
shr ax, 8
shl cx, 8
or cx, ax
mov word [rsp + 0x76], dx
movzx eax, word [rsp + 0x78]
shr ax, 8
or r8w, ax
mov word [rsp + 0x7a], cx
mov word [rsp + 0x78], r8w
sub edx, r14d
je 0x140054ab3
sub edx, r14d
je 0x140054aa5
cmp edx, 2
jne 0x140054abf
movzx eax, r8w
mov dword [rsp + 0x54], eax
movzx r15d, cx
jmp 0x140054abf
movzx eax, r8w
mov dword [rsp + 0x4c], eax
movzx r13d, cx
jmp 0x140054abf
movzx eax, r8w
mov dword [rsp + 0x50], eax
movzx r12d, cx
cmp r12d, 0xffffffff
je 0x140054ad1
cmp r13d, 0xffffffff
je 0x140054ad1
cmp r15d, 0xffffffff
jne 0x140054ae1
movzx eax, word [rsp + 0x46]
add ebx, r14d
cmp ebx, eax
jl 0x1400549ff
mov r14d, edi
test edi, edi
je 0x140054b13
cmp edi, 1
je 0x140054b00
cmp r13d, 0xffffffff
je 0x140054c95
mov ebx, dword [rsp + 0x4c]
mov eax, r13d
jmp 0x140054b24
cmp r12d, 0xffffffff
je 0x140054c95
mov ebx, dword [rsp + 0x50]
mov eax, r12d
jmp 0x140054b24
cmp r15d, 0xffffffff
je 0x140054c95
mov ebx, dword [rsp + 0x54]
mov eax, r15d
movzx edx, word [rsp + 0x48]
xor r9d, r9d
add edx, eax
xor r8d, r8d
add edx, dword [rbp - 0x78]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140054bc1
mov eax, 0x103
lea r9, [rsp + 0x40]
cmp ebx, 0x104
lea rdx, [rbp + 0xa0]
mov rcx, rsi
cmovge ebx, eax
and dword [rsp + 0x40], 0
and qword [rsp + 0x20], 0
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140054bc1
cmp dword [rsp + 0x40], ebx
jne 0x140054bc1
mov ecx, edi
test edi, edi
je 0x140054c66
sub ecx, 1
je 0x140054c58
cmp ecx, 1
jne 0x140054c95
lea rax, [rbp + 0x3c0]
mov dword [rsp + 0x28], 0x7f
mov r9d, ebx
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0xa0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ebx, ebx
test r14d, r14d
je 0x140054ca8
cmp word [rbp + 0x1b0], bx
jne 0x140054c1d
lea rdx, [rbp - 0x60]
lea rcx, [rbp + 0x1b0]
call fcn.140004ad0
cmp word [rbp + 0x3c0], bx
je 0x140054c1d
mov edi, 0x104
lea r8, [0x140168a9c]
mov edx, edi
lea rcx, [rbp + 0x1b0]
call fcn.140001f38
lea r8, [rbp + 0x3c0]
mov edx, edi
lea rcx, [rbp + 0x1b0]
call fcn.140001f38
mov word [rbp + 0x1ee], bx
mov word [rbp - 0x22], bx
cmp word [rbp - 0x60], bx
je 0x140054c3c
mov rcx, qword [rsp + 0x60]
lea rdx, [rbp - 0x60]
call fcn.14000128c
cmp word [rbp + 0x1b0], bx
je 0x140054ca5
mov rcx, qword [rsp + 0x68]
lea rdx, [rbp + 0x1b0]
call fcn.14000128c
jmp 0x140054ca8
mov dword [rsp + 0x28], 0x7f
lea rax, [rbp - 0x60]
jmp 0x140054c76
mov eax, 0x103
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x1b0]
mov r9d, ebx
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0xa0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r14d, 1
inc edi
cmp edi, 3
jge 0x140054bc1
jmp 0x140054ae4
mov r14d, ebx
lea rcx, [rsi - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140054cbb
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r14d
mov rcx, qword [rbp + 0x4c0]
xor rcx, rsp
call fcn.140139b10
mov rbx, qword [rsp + 0x610]
add rsp, 0x5d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret