Function at 0x402e10
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x80
mov eax, dword [0x45a454]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0xc], 0
jle 0x402e76
mov eax, dword [ebp + 8]
mov esi, dword [eax]
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 7
mov word [ebp - 0x80], 0
push esi
call fcn.00434b84
add esp, 4
cmp eax, 7
jbe 0x402e8d
sub esp, 0xc
movzx ecx, byte [ebp - 0x28]
mov byte [esp + 4], cl
mov dword [esp + 8], esi
mov dword [esp], eax
lea ecx, [ebp - 0x80]
call fcn.00402050
jmp 0x402eab
push str.Missing_argument_for_offsets
call fcn.00401b00
add esp, 4
mov edi, 1
jmp 0x403232
mov dword [ebp - 0x70], eax
mov ecx, eax
add ecx, eax
lea edx, [ebp - 0x80]
push ecx
push esi
push edx
mov esi, eax
call fcn.00426e20
add esp, 0xc
mov word [ebp + esi*2 - 0x80], 0
call fcn.0042e754
mov ebx, eax
cmp dword [ebp - 0x6c], 8
jb 0x402ebd
mov esi, dword [ebp - 0x80]
jmp 0x402ec0
lea esi, [ebp - 0x80]
mov dword [ebx], 0
lea eax, [ebp - 0x28]
push 0xa
push eax
push esi
call fcn.00433cd7
add esp, 0xc
cmp esi, dword [ebp - 0x28]
je 0x403249
cmp dword [ebx], 0x22
je 0x403253
mov edi, eax
mov ebx, edx
mov eax, dword [ebp - 0x6c]
cmp eax, 8
jb 0x402f29
mov ecx, dword [ebp - 0x80]
lea esi, [eax*2 + 2]
cmp esi, 0x1000
jb 0x402f1f
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40325d
add eax, eax
add eax, 0x25
mov esi, eax
mov ecx, edx
push esi
push ecx
call fcn.0040d311
add esp, 8
push 0x104
push 0x45bb90
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4030e8
xorps xmm0, xmm0
movups xmmword [ebp - 0x6c], xmm0
movups xmmword [ebp - 0x7c], xmm0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x80], 0x20
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x70], eax
mov eax, dword [sym.imp.USER32.dll_DefWindowProcA]
mov dword [ebp - 0x7c], eax
mov eax, dword [str.hook_helper_window_class]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
je 0x4030ff
push ebx
push edi
lea esi, [ebp - 0x28]
push esi
call fcn.00403870
add esp, 0xc
push 0x20
call fcn.0040d2dc
add esp, 4
mov dword [ebp - 0x30], 0x1a
mov dword [ebp - 0x2c], 0x1f
movups xmm0, xmmword [str.LocalDiscordHook_Offsets_]
movups xmmword [eax], xmm0
movups xmm0, xmmword [0x451e88]
movups xmmword [eax + 0xa], xmm0
mov byte [eax + 0x1a], 0
mov dword [ebp - 0x40], eax
sub esp, 0xc
movzx eax, byte [ebp - 0x84]
mov byte [esp], al
mov dword [esp + 8], esi
lea eax, [ebp - 0x40]
mov dword [esp + 4], eax
lea esi, [ebp - 0x58]
mov ecx, esi
call fcn.004036d0
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x403024
mov ecx, dword [ebp - 0x40]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x40301a
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40325d
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.0040d311
add esp, 8
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x40305c
mov ecx, dword [ebp - 0x28]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x403052
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40325d
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.0040d311
add esp, 8
push 0x14
call fcn.0040d2dc
add esp, 4
mov edi, eax
movaps xmm0, xmmword [0x447150]
movups xmmword [eax + 4], xmm0
mov dword [eax], 0x447140
cmp dword [ebp - 0x44], 0x10
jb 0x403082
mov esi, dword [ebp - 0x58]
lea ebx, [edi + 4]
push esi
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
test eax, eax
je 0x403116
mov dword [edi + 0xc], eax
sub esp, 0x14
movaps xmm0, xmmword [0x447160]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
xor esi, esi
test eax, eax
je 0x403162
mov dword [edi + 0x10], eax
mov ecx, dword [eax]
mov dword [ebp - 0x88], 0
cmp ecx, 0x158
jne 0x403128
lock inc dword [ebx]
mov esi, eax
mov dword [ebp - 0x88], edi
lock dec dword [ebx]
je 0x40312d
jmp 0x403171
push str.GetSystemDirectoryW_failed
call fcn.00401b00
add esp, 4
mov edi, 2
jmp 0x403232
push str.RegisterClassA_failed
call fcn.00401b00
add esp, 4
mov edi, 3
jmp 0x403232
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
mov dword [ebp - 0x88], 0
lock dec dword [ebx]
jne 0x403171
mov ebx, edi
add ebx, 8
mov eax, dword [edi]
mov ecx, dword [eax]
mov dword [ebp - 0x8c], ecx
call dword [0x457158]
mov ecx, edi
call dword [ebp - 0x8c]
lock dec dword [ebx]
jne 0x403171
mov eax, dword [edi]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [0x457158]
mov ecx, edi
call ebx
jmp 0x403171
mov dword [ebp - 0x88], 0
lock dec dword [ebx]
je 0x40312d
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x4031a9
mov ecx, dword [ebp - 0x58]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x40319f
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x40325d
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.0040d311
add esp, 8
lea eax, [esi + 4]
push eax
call section..text
add esp, 4
movzx edi, byte [esi + 4]
and edi, 1
xor edi, 1
shl edi, 0x10
lea eax, [esi + 0x144]
lea ecx, [esi + 0x1c]
push eax
push ecx
call fcn.00401230
add esp, 8
test byte [esi + 0x1c], 1
lea ebx, [edi + 0x20000]
cmovne ebx, edi
lea eax, [esi + 0x38]
push eax
call fcn.00405510
add esp, 4
test byte [esi + 0x38], 1
lea edi, [ebx + 0x40000]
cmovne edi, ebx
mov esi, dword [ebp - 0x88]
test esi, esi
je 0x403232
lock dec dword [esi + 4]
jne 0x403232
mov eax, dword [esi]
mov ebx, dword [eax]
mov ecx, ebx
call dword [0x457158]
mov ecx, esi
call ebx
lock dec dword [esi + 8]
jne 0x403232
mov eax, dword [esi]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [0x457158]
mov ecx, esi
call ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d348
mov eax, edi
add esp, 0x80
pop esi
pop edi
pop ebx
pop ebp
ret
push str.invalid_stoull_argument
call fcn.00410f10
push str.stoull_argument_out_of_range
call fcn.00410f50
call fcn.0042eda3
int3