Function at 0x180042630
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x190]
sub rsp, 0x290
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x2e8], rbx
mov rax, qword [0x1800eb008]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov r13, r8
mov rax, rdx
mov qword [rsp + 0x40], rdx
mov rsi, rcx
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov r15d, 3
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rbx + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
jne 0x1800426c0
call fcn.180002050
mov edi, eax
jmp 0x180042bb2
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x1800426dc
mov edi, 0x80004005
jmp 0x180042bb2
cmp edi, 0xa00000
jbe 0x1800426ee
mov edi, 0xe00e1001
jmp 0x180042bb2
lea eax, [rdi + 2]
mov r12d, eax
lea rdx, [0x1800ece24]
mov ecx, eax
call fcn.180072944
mov r14, rax
mov qword [rsp + 0x60], rax
test rax, rax
jne 0x180042719
mov edi, 0x8007000e
jmp 0x180042b9b
mov r8, r12
xor edx, edx
mov rcx, r14
call fcn.18008c000
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov r12, qword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18004274d
call fcn.180002050
mov edi, eax
jmp 0x180042b9b
mov dword [rsp + 0x58], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x58]
mov r8d, edi
mov rdx, r14
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18004277a
call fcn.180002050
mov edi, eax
jmp 0x180042b9b
mov rax, qword [r14]
cmp rax, qword [str.MEDIA_DESCRIPTOR]
jne 0x180042b96
mov rax, qword [r14 + 8]
cmp rax, qword [0x1800d9968]
jne 0x180042b96
cmp byte [r14 + 0x10], 2
jb 0x1800428b3
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.18008c000
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
lea rdx, [0x1800d9698]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1800427fd
mov edi, 0xe003200a
jmp 0x180042b9b
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
jne 0x180042839
call fcn.180002050
mov edi, eax
jmp 0x180042896
mov rdx, r15
mov rcx, rsi
call fcn.180044360
test eax, eax
je 0x18004284f
mov edi, 0xe003200a
jmp 0x180042896
test r13, r13
je 0x180042862
lea rdx, [rsp + 0x70]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov qword [rsp + 0x40], rbx
lea rdx, [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x180042882
call fcn.180002050
mov edi, eax
jmp 0x180042896
mov eax, dword [rsi + 0x34]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov qword [rsi + 0x370], rcx
mov edi, ebx
cmp r15, 0xffffffffffffffff
je 0x1800428a5
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], 0xffffffffffffffff
jmp 0x180042b9b
mov r12d, dword [r14 + 0x50]
lea rax, [r12 + 0x18]
cmp rax, rdi
ja case.0x180042966.6
cmp word [r14 + 0x14], 0
je case.0x180042966.6
movzx eax, word [r12 + r14 + 0xe]
lea rcx, [rax + rax*4]
shl rcx, 4
mov eax, dword [r12 + r14 + 0x14]
add rcx, rax
cmp rcx, rdi
jbe 0x1800428ee
mov edi, 0x80004005
jmp 0x180042b9b
mov eax, dword [r12 + r14]
add eax, 0x96
imul eax, eax, 0x930
mov dword [rsi + 0x34], eax
mov r11d, dword [r12 + r14 + 0x14]
add r11, r14
mov eax, ebx
movzx ecx, byte [r12 + r14 + 0xa]
test ecx, ecx
je 0x180042925
cmp byte [r11 + 4], 1
je 0x180042925
inc eax
add r11, 0x50
cmp eax, ecx
jl 0x180042914
cmp eax, ecx
jl 0x180042933
mov edi, 0x80004005
jmp 0x180042b9b
movzx eax, word [r11 + 0x10]
mov dword [rsi + 0x28], eax
mov ecx, dword [r12 + r14 + 4]
imul rcx, rax
mov qword [rsi + 0x370], rcx
movzx eax, byte [r11]
and eax, 7
movsxd rcx, eax
lea rdx, [0x180000000]
mov eax, dword [rdx + rcx*4 + 0x42bf8]
add rax, rdx
jmp rax
mov r15d, 1
jmp case.0x180042966.0
mov r15d, 2
jmp case.0x180042966.0
mov r15d, 4
jmp case.0x180042966.0
mov r15d, 5
mov r8d, dword [rsi + 0x28]
mov edx, r15d
mov rcx, rsi
call fcn.180043720
mov edi, eax
test eax, eax
js 0x180042b9b
cmp eax, 1
je 0x180042b9b
mov ecx, dword [r11 + 0x34]
mov dword [rsp + 0x48], ecx
test r13, r13
je 0x1800429f9
cmp byte [r14 + 0x10], 1
jne 0x1800429c8
cmp byte [r14 + 0x11], 5
mov eax, 1
jae 0x1800429ca
mov eax, ebx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov r9, r14
mov r8, r13
mov rdx, qword [rsp + 0x40]
call fcn.180042c20
mov edi, eax
test eax, eax
js 0x180042b9b
cmp eax, 1
je 0x180042b9b
mov ecx, dword [rsp + 0x48]
cmp dword [rsi + 0x364], 0
je 0x180042a09
mov edi, ebx
jmp 0x180042b9b
cmp r15d, 1
jne 0x180042a1d
mov dword [rsi + 0x3c], r15d
mov dword [rsi + 0x378], 0x930
xor eax, eax
mov qword [rsp + 0x40], rax
mov r10d, ebx
mov edx, dword [r12 + r14 + 0x14]
add rdx, 4
mov r8d, ebx
cmp byte [r12 + r14 + 0xa], al
jbe 0x180042b8a
add rdx, r14
movzx r11d, byte [rsp + 0x47]
movzx edi, byte [rsp + 0x46]
movzx r15d, byte [rsp + 0x45]
movzx r13d, byte [rsp + 0x42]
movzx r9d, byte [rsp + 0x41]
nop
movzx eax, byte [rdx]
cmp al, 0xa2
jne 0x180042a83
mov r13b, 0xaa
movzx r9d, byte [rdx - 2]
movzx r15d, byte [rdx + 5]
movzx edi, byte [rdx + 6]
movzx r11d, byte [rdx + 7]
mov r10d, 1
cmp al, 0x99
ja 0x180042b13
movzx eax, word [rdx + 0xc]
cmp eax, dword [rsi + 0x28]
jne case.0x180042966.6
cmp dword [rdx + 0x30], ecx
jne case.0x180042966.6
mov eax, dword [rsi + 0x364]
lea rcx, [rsi + rax*8]
movzx eax, byte [rdx - 2]
xor al, byte [rcx + 0x45]
and al, 0xf
xor byte [rcx + 0x45], al
mov eax, dword [rsi + 0x364]
lea rcx, [rsi + rax*8]
movzx eax, byte [rdx - 2]
xor al, byte [rcx + 0x45]
and al, 0xf
xor al, byte [rdx - 2]
mov byte [rcx + 0x45], al
movzx ecx, byte [rsi + 0x364]
inc cl
mov eax, dword [rsi + 0x364]
mov byte [rsi + rax*8 + 0x46], cl
mov ecx, dword [rsi + 0x364]
movzx eax, byte [rdx + 5]
mov byte [rsi + rcx*8 + 0x49], al
mov ecx, dword [rsi + 0x364]
movzx eax, byte [rdx + 6]
mov byte [rsi + rcx*8 + 0x4a], al
mov ecx, dword [rsi + 0x364]
movzx eax, byte [rdx + 7]
mov byte [rsi + rcx*8 + 0x4b], al
inc dword [rsi + 0x364]
inc r8d
add rdx, 0x50
movzx eax, byte [r12 + r14 + 0xa]
cmp r8d, eax
jge 0x180042b2e
mov ecx, dword [rsp + 0x48]
jmp 0x180042a60
test r10d, r10d
je 0x180042b8a
mov eax, dword [rsi + 0x364]
lea rcx, [rsi + rax*8]
and byte [rcx + 0x45], 0xf0
movzx eax, r9b
and al, 0xf
or byte [rcx + 0x45], al
mov eax, dword [rsi + 0x364]
and byte [rsi + rax*8 + 0x45], 0xf
and r9b, 0xf0
or byte [rsi + rax*8 + 0x45], r9b
mov eax, dword [rsi + 0x364]
mov byte [rsi + rax*8 + 0x46], r13b
mov eax, dword [rsi + 0x364]
mov byte [rsi + rax*8 + 0x49], r15b
mov eax, dword [rsi + 0x364]
mov byte [rsi + rax*8 + 0x4a], dil
mov eax, dword [rsi + 0x364]
mov byte [rsi + rax*8 + 0x4b], r11b
mov rcx, rsi
call fcn.180043970
mov edi, ebx
jmp 0x180042b9b
mov edi, 0xe00e1001
test r14, r14
je 0x180042bad
mov rcx, r14
call fcn.18007294c
mov qword [rsp + 0x60], rbx
mov r14, qword [rsp + 0x50]
cmp r14, 0xffffffffffffffff
je 0x180042bc1
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov qword [rsp + 0x50], 0xffffffffffffffff
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.180072920
mov rbx, qword [rsp + 0x2e8]
add rsp, 0x290
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret