Function at 0x180151900
Capabilities:
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 - 0x27]
sub rsp, 0xe0
mov qword [rbp - 0x39], 0xfffffffffffffffe
mov qword [rsp + 0x130], rbx
mov rax, qword [0x1804610b0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r13, rdx
mov rbx, rcx
xor edi, edi
cmp byte [rcx + 0xc0], dil
je 0x180151b37
lea rdx, [rcx + 0x38]
lea r8, str.skinPreview.png
lea rcx, [rbp - 9]
call fcn.18006c550
nop
lea rcx, [rbp - 9]
call fcn.1801dbd90
test al, al
je 0x180151b29
mov qword [rsp + 0x30], rdi
lea ecx, [rdi + 8]
call fcn.1802994e4
mov qword [rbp - 0x11], rax
mov rsi, 0xffffffffffffffff
mov qword [rax], rsi
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea r9d, [rdi + 1]
mov r8d, 0x80000000
lea rdx, [rbp - 9]
lea rcx, [rsp + 0x30]
call fcn.1801e1a50
test al, al
jne 0x180151a2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xffffffe0
cmp eax, 1
ja 0x180151a23
mov ebx, edi
nop dword [rax]
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov r9d, 1
mov r8d, 0x80000000
lea rdx, [rbp - 9]
lea rcx, [rsp + 0x30]
call fcn.1801e1a50
test al, al
jne 0x180151a2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xffffffe0
cmp eax, 1
ja 0x180151a23
inc rbx
cmp rbx, 0xc8
jb 0x1801519d0
mov rbx, qword [rsp + 0x30]
jmp 0x180151ae8
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x180151ae8
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180151ae8
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
cmp eax, 0xffffffff
jne 0x180151a68
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180151ae8
mov ecx, dword [rbp - 0x11]
shl rcx, 0x20
add rcx, r14
je 0x180151ae8
mov r15d, ecx
mov ecx, ecx
lea rdx, [0x180488a90]
call fcn.180299938
mov r14, rax
test rax, rax
je 0x180151ae8
mov dword [rbp - 0x31], edi
cmp qword [rbx], 0xffffffffffffffff
jne 0x180151a9b
xor r12b, r12b
jmp 0x180151ab9
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x31]
mov r8d, r15d
mov rdx, r14
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne r12b
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180151acf
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180151acf
mov qword [rbx], rsi
test r12b, r12b
je 0x180151ae0
cmp dword [rbp - 0x31], r15d
jne 0x180151ae0
mov dword [r13], r15d
jmp 0x180151aeb
mov rcx, r14
call fcn.180299904
mov r14, rdi
test rbx, rbx
je 0x180151b18
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x180151b06
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], rdi
mov edx, 8
mov rcx, rbx
call fcn.180299904
mov qword [rsp + 0x30], rdi
lea rcx, [rbp - 9]
call fcn.1800338a0
mov rax, r14
jmp 0x180151c7c
lea rcx, [rbp - 9]
call fcn.1800338a0
jmp 0x180151c7a
xor eax, eax
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x69], rdi
mov qword [rbp - 0x61], rdi
mov qword [rbp - 0x69], rdi
mov qword [rbp - 0x61], 7
mov word [rbp - 0x79], di
lea r8d, [rax + 0x18]
lea rdx, str.RCIM_SKIN_RESOURCE_MUTEX
lea rcx, [rbp - 0x79]
call fcn.180033930
nop
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x29]
call fcn.18017f5d0
nop
lea rcx, [rbp - 0x79]
call fcn.1800338a0
mov qword [rbp - 0x49], rdi
mov qword [rbp - 0x41], rdi
mov qword [rbp - 0x49], rdi
mov qword [rbp - 0x41], 7
mov word [rbp - 0x59], di
mov r8d, 0xf
lea rdx, str.skinPreview.png
lea rcx, [rbp - 0x59]
call fcn.180033930
nop
mov r8, r13
lea rdx, [rbp - 0x59]
mov rcx, rbx
call fcn.180151190
mov rsi, rax
lea rcx, [rbp - 0x59]
call fcn.1800338a0
test rsi, rsi
je 0x180151c14
movsxd rcx, dword [r13]
test ecx, ecx
je 0x180151c14
lea rdx, [0x180488a90]
call fcn.180299938
mov rbx, rax
test rax, rax
je 0x180151c06
movsxd r8, dword [r13]
mov rdx, rsi
mov rcx, rax
call fcn.18029c510
mov rdi, rbx
lea rcx, [rbp - 0x29]
call fcn.18017f740
mov rax, rdi
jmp 0x180151c7c
mov rbx, qword [rbp - 0x29]
test rbx, rbx
je 0x180151c39
cmp byte [rbp - 0x19], 0
je 0x180151c39
mov rcx, qword [rbx]
test rcx, rcx
je 0x180151c31
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [rbx + 8], 0
mov byte [rbp - 0x19], 0
lea rcx, [rbp - 0x29]
call fcn.18003d460
nop
mov rbx, qword [rbp - 0x21]
test rbx, rbx
je 0x180151c7a
mov rsi, 0xffffffffffffffff
mov eax, esi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x180151c7a
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], esi
cmp esi, 1
jne 0x180151c7a
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1802994c0
mov rbx, qword [rsp + 0x130]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret