Function at 0x140054ce8
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 - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x1401e7e78]
xor rax, rsp
mov qword [rbp + 0x590], rax
mov rbx, rdx
mov qword [rsp + 0x50], r8
xor r15d, r15d
mov qword [rsp + 0x58], r9
mov r13, r8
mov rcx, rbx
mov esi, r15d
lea r14d, [r15 + 1]
mov r8b, r14b
mov dl, r14b
call fcn.14002b004
mov rcx, qword [0x14021c740]
mov edx, r14d
call fcn.140087888
test eax, eax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov r8d, r14d
setne r12b
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14005539a
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r15d
lea r8d, [r15 + 0xc]
mov qword [rsp + 0x20], r15
lea rdx, [rsp + 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140055387
cmp dword [rsp + 0x40], 0xc
jne 0x140055387
movzx r8d, byte [rsp + 0x74]
movzx eax, word [rsp + 0x74]
movzx ecx, byte [rsp + 0x70]
movzx edx, byte [rsp + 0x72]
shr ax, 8
shl r8w, 8
or r8w, ax
shl cx, 8
movzx eax, word [rsp + 0x70]
shr ax, 8
or cx, ax
shl dx, 8
movzx eax, word [rsp + 0x72]
shr ax, 8
or dx, ax
mov word [rsp + 0x74], r8w
mov word [rsp + 0x70], cx
mov word [rsp + 0x72], dx
cmp cx, r14w
jne 0x140055387
test dx, dx
jne 0x140055387
mov ebx, r15d
cmp r15w, r8w
jae 0x140055387
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r15d
mov r8d, 0x10
mov qword [rsp + 0x20], r15
lea rdx, [rbp - 0x80]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140054e75
cmp dword [rsp + 0x40], r15d
je 0x140054e75
mov r8d, 4
lea rdx, [0x14017a8ac]
lea rcx, [rbp - 0x80]
call fcn.140120154
test eax, eax
je 0x140054e87
movzx eax, word [rsp + 0x74]
add ebx, r14d
cmp ebx, eax
jge 0x140055387
jmp 0x140054e2e
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, rdi
shl edx, 8
or edx, eax
mov dword [rbp - 0x78], edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140055387
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r15d
mov r8d, 6
mov qword [rsp + 0x20], r15
lea rdx, [rsp + 0x44]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140055387
cmp dword [rsp + 0x40], r15d
je 0x140055387
movzx edx, byte [rsp + 0x46]
mov r14d, r15d
movzx eax, word [rsp + 0x46]
movzx ecx, byte [rsp + 0x48]
shr ax, 8
shl dx, 8
or dx, ax
shl cx, 8
movzx eax, word [rsp + 0x48]
shr ax, 8
or cx, ax
mov word [rsp + 0x46], dx
mov word [rsp + 0x48], cx
cmp r15w, dx
jae 0x140055387
mov ebx, 1
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r15d
mov r8d, 0xc
mov qword [rsp + 0x20], r15
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005532c
cmp dword [rsp + 0x40], r15d
je 0x14005532c
movzx ecx, byte [rsp + 0x66]
movzx eax, word [rsp + 0x66]
shl cx, 8
shr ax, 8
or cx, ax
mov word [rsp + 0x66], cx
cmp cx, bx
jne 0x14005532c
movzx ecx, byte [rsp + 0x68]
mov r9d, ebx
movzx eax, word [rsp + 0x68]
xor r8d, r8d
shl cx, 8
xor edx, edx
shr ax, 8
or cx, ax
movzx eax, word [rsp + 0x6a]
mov word [rsp + 0x68], cx
movzx ecx, byte [rsp + 0x6a]
shl cx, 8
shr ax, 8
or cx, ax
mov word [rsp + 0x6a], cx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx r8d, word [rsp + 0x6a]
xor r9d, r9d
add r8d, dword [rbp - 0x78]
mov rcx, rdi
movzx edx, word [rsp + 0x48]
mov r15d, eax
add edx, r8d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140055317
cmp word [rsp + 0x68], 0x40
ja 0x140055317
xor edx, edx
lea rcx, [rbp - 0x70]
lea r8d, [rdx + 0x46]
call fcn.14013b230
movzx r8d, word [rsp + 0x68]
lea r9, [rsp + 0x40]
and dword [rsp + 0x40], 0
lea rdx, [rbp - 0x70]
and qword [rsp + 0x20], 0
add r8d, 2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r9d, r9d
test eax, eax
je 0x140055317
cmp dword [rsp + 0x40], r9d
je 0x140055317
movzx eax, word [rsp + 0x68]
cmp rax, 0x46
jae 0x1400553c6
lea rdx, [rax + 1]
mov byte [rbp + rax - 0x70], r9b
mov r10d, eax
mov ecx, eax
cmp rdx, 0x46
jae 0x1400553c6
add rcx, 2
mov byte [rbp + rdx - 0x70], r9b
cmp rcx, 0x46
jae 0x1400553c6
mov byte [rbp + rcx - 0x70], r9b
mov ebx, r9d
test r12b, r12b
je 0x140055192
movzx eax, word [rsp + 0x64]
lea rdx, str.__Platf:__u_Enc:__u_Lang:__u_Len:__u__
movzx r9d, word [rsp + 0x62]
lea rcx, [rbp - 0x20]
movzx r8d, word [rsp + 0x60]
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], eax
call fcn.14000d110
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8d, dword [rsp + 0x40]
xor r9d, r9d
test r8d, r8d
je 0x140055167
movsxd rcx, eax
lea rdx, [rbp - 0x20]
add eax, r8d
xor r13d, r13d
lea rdx, [rdx + rcx*2]
lea rcx, [rbp - 0x70]
cmp byte [rcx], r13b
je 0x140055148
movsx r9d, byte [rcx]
jmp 0x14005514e
mov r9d, 0x2e
mov word [rdx], r9w
inc rcx
add rdx, 2
sub r8, 1
jne 0x14005513d
mov r13, qword [rsp + 0x50]
xor r9d, r9d
cdqe
mov ecx, 0x22
mov word [rbp + rax*2 - 0x20], cx
lea rax, [rax*2 + 2]
cmp rax, 0x190
jae 0x1400553c6
mov word [rbp + rax - 0x20], r9w
movzx eax, word [rsp + 0x68]
movzx edx, word [rsp + 0x60]
mov r10d, 0x300
mov r8, qword [rbp - 0x70]
mov r11d, 0x100
movzx ecx, word [rsp + 0x62]
cmp dx, r10w
jne 0x1400551b8
cmp cx, r11w
je 0x1400551cc
test dx, dx
jne 0x14005522f
test cx, cx
je 0x1400551cc
cmp cx, r10w
jne 0x1400552a7
test r8w, r8w
je 0x14005522f
movzx r8d, ax
mov rdx, r9
test r8, r8
je 0x1400551ff
movzx eax, byte [rbp + rdx*2 - 0x70]
movzx ecx, byte [rbp + rdx*2 - 0x6f]
shl ax, 8
or cx, ax
mov word [rbp + rdx*2 + 0x170], cx
inc rdx
cmp rdx, r8
jl 0x1400551de
add rdx, rdx
cmp rdx, 0x208
jae 0x1400553c6
mov word [rbp + rdx + 0x170], r9w
cmp word [rbp + 0x170], r9w
je 0x1400552a7
lea rbx, [rbp + 0x170]
jmp 0x1400552a2
cmp dx, r11w
jne 0x1400552a7
test cx, cx
jne 0x1400552a7
test r8b, r8b
je 0x1400552a7
movzx ecx, ax
mov eax, ecx
cmp byte [rbp + rax - 0x70], 0x20
jne 0x140055260
cmp rax, 0x46
jae 0x1400553c6
mov byte [rbp + rax - 0x70], r9b
sub rax, 1
jns 0x140055244
cmp rcx, 0x46
jae 0x1400553c6
mov byte [rbp + rcx - 0x70], r9b
cmp byte [rbp - 0x70], r9b
je 0x1400552a7
lea rax, [rbp + 0x380]
mov dword [rsp + 0x28], 0x21
or r9d, 0xffffffff
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x70]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rbx, [rbp + 0x380]
mov esi, 1
test r12b, r12b
je 0x140055312
test rbx, rbx
je 0x1400552e0
lea r8, [0x14017a910]
mov edx, 0xc8
lea rcx, [rbp - 0x20]
call fcn.140001f38
mov r8, rbx
lea rcx, [rbp - 0x20]
mov edx, 0xc8
call fcn.140001f38
lea r8, [0x14016b508]
jmp 0x1400552e7
lea r8, str.___UNKNOWN_FORMAT
mov edx, 0xc8
lea rcx, [rbp - 0x20]
call fcn.140001f38
mov rcx, qword [0x14021c5d8]
lea rdx, [rbp - 0x20]
mov ebx, 1
mov r9b, bl
mov r8b, bl
call fcn.140016cd0
jmp 0x140055317
mov ebx, 1
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor r15d, r15d
movzx eax, word [rsp + 0x46]
add r14d, ebx
cmp r14d, eax
jl 0x140054f79
test esi, esi
je 0x140055387
cmp word [rbp + 0x380], r15w
lea rax, [rbp + 0x170]
lea rdx, [rbp + 0x380]
mov rcx, r13
cmove rdx, rax
call fcn.14000128c
cmp word [rbp + 0x170], r15w
lea rax, [rbp + 0x380]
mov rcx, qword [rsp + 0x58]
lea rdx, [rbp + 0x170]
cmove rdx, rax
call fcn.14000128c
lea rcx, [rdi - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14005539a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.140139b10
mov rbx, qword [rsp + 0x6e0]
add rsp, 0x6a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.14013a21c
int3