Function at 0x140003130
Capabilities:
Get common file path

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0xe8
mov rax, qword [0x14007c498]
xor rax, rsp
mov qword [rsp + 0xe0], rax
test edx, edx
jle 0x140003197
mov rsi, qword [rcx]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], 0
mov rcx, rsi
call fcn.14004c5f0
cmp rax, 7
jbe 0x1400031ad
lea rcx, [rsp + 0x30]
mov rdx, rax
mov r9, rsi
call fcn.1400022a0
jmp 0x1400031cf
lea rcx, str.Missing_argument_for_offsets
call fcn.140001cb0
mov edi, 1
jmp 0x1400036b4
mov qword [rsp + 0x40], rax
mov r8, rax
add r8, rax
lea rcx, [rsp + 0x30]
mov rdx, rsi
mov rsi, rax
call fcn.140038e70
mov word [rsp + rsi*2 + 0x30], 0
call fcn.140042b88
mov rdi, rax
cmp qword [rsp + 0x48], 8
jb 0x1400031e6
mov rbx, qword [rsp + 0x30]
jmp 0x1400031eb
lea rbx, [rsp + 0x30]
mov dword [rdi], 0
lea rdx, [rsp + 0xc0]
mov rcx, rbx
mov r8d, 0xa
call fcn.14004b43c
cmp rbx, qword [rsp + 0xc0]
je 0x1400036d3
cmp dword [rdi], 0x22
je 0x1400036df
mov rsi, rax
mov rax, qword [rsp + 0x48]
cmp rax, 8
jb 0x140003269
mov rcx, qword [rsp + 0x30]
lea rdx, [rax*2 + 2]
cmp rdx, 0x1000
jb 0x140003264
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x1400036eb
add rax, rax
add rax, 0x29
mov rdx, rax
mov rcx, r8
call fcn.14000e420
lea rcx, [0x14007e040]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140003390
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x30], 0x20
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x48], rax
mov rax, qword [sym.imp.USER32.dll_DefWindowProcA]
mov qword [rsp + 0x38], rax
mov rax, qword [str.hook_helper_window_class]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x1400033a6
lea rbx, [rsp + 0xb5]
xor edi, edi
movabs rcx, 0xcccccccccccccccd
nop dword [rax + rax]
mov rax, rsi
mul rcx
shr rdx, 3
lea eax, [rdx + rdx]
lea eax, [rax + rax*4]
mov r8d, esi
sub r8d, eax
or r8b, 0x30
mov byte [rbx - 1], r8b
dec rbx
inc rdi
cmp rsi, 9
mov rsi, rdx
ja 0x140003300
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0xd8], 0xf
mov byte [rsp + 0xc0], 0
cmp rdi, 0xf
jbe 0x1400033bc
test rdi, rdi
js 0x1400036f0
mov rax, rdi
or rax, 0xf
cmp rax, 0x17
mov r14d, 0x16
cmovae r14, rax
cmp rax, 0xfff
jb 0x1400033e1
lea rcx, [r14 + 0x28]
call fcn.14000e3dc
lea rsi, [rax + 0x27]
and rsi, 0xffffffffffffffe0
mov qword [rsi - 8], rax
jmp 0x1400033ed
lea rcx, str.GetSystemDirectoryW_failed
call fcn.140001cb0
mov edi, 2
jmp 0x1400036b4
lea rcx, str.RegisterClassA_failed
call fcn.140001cb0
mov edi, 3
jmp 0x1400036b4
mov qword [rsp + 0xd0], rdi
lea rcx, [rsp + 0xc0]
mov rdx, rbx
mov r8, rdi
call fcn.140038e70
mov byte [rsp + rdi + 0xc0], 0
jmp 0x140003417
lea rcx, [r14 + 1]
call fcn.14000e3dc
mov rsi, rax
mov qword [rsp + 0xd0], rdi
mov qword [rsp + 0xd8], r14
mov rcx, rsi
mov rdx, rbx
mov r8, rdi
call fcn.140038e70
mov byte [rsi + rdi], 0
mov qword [rsp + 0xc0], rsi
mov ecx, 0x20
call fcn.14000e3dc
mov qword [rsp + 0xb0], 0x1a
mov qword [rsp + 0xb8], 0x1f
movups xmm0, xmmword [str.LocalDiscordHook_Offsets_]
movups xmmword [rax], xmm0
movups xmm0, xmmword [0x140070c45]
movups xmmword [rax + 0xa], xmm0
mov byte [rax + 0x1a], 0
mov qword [rsp + 0xa0], rax
lea rsi, [rsp + 0x80]
lea r8, [rsp + 0xa0]
lea r9, [rsp + 0xc0]
mov rcx, rsi
call fcn.140003bd0
mov rax, qword [rsp + 0xb8]
cmp rax, 0x10
jb 0x1400034c1
mov rcx, qword [rsp + 0xa0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400034bc
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x1400036eb
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14000e420
mov rax, qword [rsp + 0xd8]
cmp rax, 0x10
jb 0x140003508
mov rcx, qword [rsp + 0xc0]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140003503
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x1400036eb
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14000e420
mov ecx, 0x20
call fcn.14000e3dc
mov rbx, rax
movabs rax, 0x100000001
mov qword [rbx + 8], rax
lea rax, [0x140062100]
mov qword [rbx], rax
xorps xmm0, xmm0
movups xmmword [rbx + 0x10], xmm0
cmp qword [rsp + 0x98], 0x10
jb 0x140003547
mov rsi, qword [rsp + 0x80]
lea r14, [rbx + 8]
mov ecx, 0xf001f
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_OpenFileMappingA]
test rax, rax
je 0x1400035aa
lea rcx, [rbx + 0x10]
mov qword [rcx], rax
mov qword [rsp + 0x20], 0x158
xor esi, esi
mov rcx, rax
mov edx, 0xf001f
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
je 0x1400035bc
mov rdi, rax
mov qword [rbx + 0x18], rax
mov eax, dword [rax]
cmp eax, 0x158
jne 0x1400035b0
lock inc dword [r14]
mov rsi, rbx
lock dec dword [r14]
je 0x1400035c4
jmp 0x1400035f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
xor esi, esi
lock dec dword [r14]
je 0x1400035c4
jmp 0x1400035f0
xor edi, edi
lock dec dword [r14]
jne 0x1400035f0
mov r14, rbx
add r14, 0xc
mov rax, qword [rbx]
mov rax, qword [rax]
mov rcx, rbx
call qword [0x140076550]
lock dec dword [r14]
jne 0x1400035f0
mov rax, qword [rbx]
mov rax, qword [rax + 8]
mov rcx, rbx
call qword [0x140076550]
mov rax, qword [rsp + 0x98]
cmp rax, 0x10
jb 0x140003637
mov rcx, qword [rsp + 0x80]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140003632
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x1400036eb
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14000e420
lea rcx, [rdi + 4]
call section..text
movzx ebx, byte [rdi + 4]
and ebx, 1
xor ebx, 1
shl ebx, 0x10
lea rdx, [rdi + 0x144]
lea rcx, [rdi + 0x1c]
call fcn.1400012b0
test byte [rdi + 0x1c], 1
lea r14d, [rbx + 0x20000]
cmovne r14d, ebx
lea rcx, [rdi + 0x38]
call fcn.140005710
test byte [rdi + 0x38], 1
lea edi, [r14 + 0x40000]
cmovne edi, r14d
test rsi, rsi
je 0x1400036b4
lock dec dword [rsi + 8]
jne 0x1400036b4
mov rax, qword [rsi]
mov rax, qword [rax]
mov rcx, rsi
call qword [0x140076550]
lock dec dword [rsi + 0xc]
jne 0x1400036b4
mov rax, qword [rsi]
mov rax, qword [rax + 8]
mov rcx, rsi
call qword [0x140076550]
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.14000e5d0
mov eax, edi
add rsp, 0xe8
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rcx, str.invalid_stoull_argument
call fcn.140014454
lea rcx, str.stoull_argument_out_of_range
call fcn.14001449c
call fcn.1400432ac
call fcn.1400023c0
int3