Function at 0x402dd0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x7c
mov eax, dword [0x459444]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0xc], 0
jle 0x402e34
mov eax, dword [ebp + 8]
mov edi, dword [eax]
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 7
mov word [ebp - 0x80], 0
push edi
call fcn.00433624
add esp, 4
mov esi, eax
cmp eax, 7
jbe 0x402e4b
sub esp, 0xc
mov al, byte [ebp - 0x28]
mov byte [esp + 4], al
mov dword [esp + 8], edi
mov dword [esp], esi
lea ecx, [ebp - 0x80]
call fcn.00401ff0
jmp 0x402e67
push str.Missing_argument_for_offsets
call fcn.00401a40
add esp, 4
mov edi, 1
jmp 0x4031ca
mov dword [ebp - 0x70], esi
mov eax, esi
add eax, esi
lea ecx, [ebp - 0x80]
push eax
push edi
push ecx
call fcn.004258c0
add esp, 0xc
mov word [ebp + esi*2 - 0x80], 0
call fcn.0042d1f4
mov ebx, eax
cmp dword [ebp - 0x6c], 8
jb 0x402e79
mov esi, dword [ebp - 0x80]
jmp 0x402e7c
lea esi, [ebp - 0x80]
mov dword [ebx], 0
lea eax, [ebp - 0x28]
push 0xa
push eax
push esi
call fcn.00432777
add esp, 0xc
cmp esi, dword [ebp - 0x28]
je 0x4031de
cmp dword [ebx], 0x22
je 0x4031e8
mov edi, edx
mov esi, eax
mov ecx, dword [ebp - 0x6c]
cmp ecx, 8
jb 0x402ee4
mov eax, dword [ebp - 0x80]
lea edx, [ecx + ecx]
add edx, 2
cmp edx, 0x1000
jb 0x402eda
mov edx, eax
add edx, 0xfffffffc
mov eax, dword [eax - 4]
sub edx, eax
cmp edx, 0x20
jae 0x4031f2
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.0040ad91
add esp, 8
push 0x104
push 0x45ab80
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x403098
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 0x4030af
push edi
push esi
lea esi, [ebp - 0x28]
push esi
call fcn.00403810
add esp, 0xc
push 0x20
call fcn.0040ad5c
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 [0x450e38]
movups xmmword [eax + 0xa], xmm0
mov byte [eax + 0x1a], 0
mov dword [ebp - 0x40], eax
sub esp, 0xc
mov al, 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.00403660
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x402fde
mov ecx, dword [ebp - 0x40]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x402fd4
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x4031f2
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.0040ad91
add esp, 8
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x403016
mov ecx, dword [ebp - 0x28]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x40300c
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x4031f2
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.0040ad91
add esp, 8
push 0x14
call fcn.0040ad5c
add esp, 4
mov edi, eax
movaps xmm0, xmmword [0x446150]
movups xmmword [eax + 4], xmm0
mov dword [eax], 0x446140
cmp dword [ebp - 0x44], 0x10
jb 0x40303c
mov esi, dword [ebp - 0x58]
push esi
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
test eax, eax
je 0x4030c6
mov dword [edi + 0xc], eax
sub esp, 0x14
movaps xmm0, xmmword [0x446160]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x4030cc
mov dword [edi + 0x10], eax
mov ecx, dword [eax]
mov dword [ebp - 0x88], 0
mov esi, 0
cmp ecx, 0x158
jne 0x4030d8
lock add dword [edi + 4], 1
mov dword [ebp - 0x88], edi
mov esi, eax
jmp 0x4030d8
push str.GetSystemDirectoryW_failed
call fcn.00401a40
add esp, 4
mov edi, 2
jmp 0x4031ca
push str.RegisterClassA_failed
call fcn.00401a40
add esp, 4
mov edi, 3
jmp 0x4031ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x88], 0
xor esi, esi
lock sub dword [edi + 4], 1
jne 0x403107
mov eax, dword [edi]
mov ebx, dword [eax]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, edi
call ebx
lock sub dword [edi + 8], 1
jne 0x403107
mov eax, dword [edi]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, edi
call ebx
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x40313f
mov ecx, dword [ebp - 0x58]
lea edi, [eax + 1]
cmp edi, 0x1000
jb 0x403135
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x4031f2
add eax, 0x24
mov edi, eax
mov ecx, edx
push edi
push ecx
call fcn.0040ad91
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
lea ebx, [edi + 0x20000]
test byte [esi + 0x1c], 1
cmovne ebx, edi
lea eax, [esi + 0x38]
push eax
call fcn.00405490
add esp, 4
lea edi, [ebx + 0x40000]
test byte [esi + 0x38], 1
cmovne edi, ebx
mov esi, dword [ebp - 0x88]
test esi, esi
je 0x4031ca
lock sub dword [esi + 4], 1
jne 0x4031ca
mov eax, dword [esi]
mov ebx, dword [eax]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
lock sub dword [esi + 8], 1
jne 0x4031ca
mov eax, dword [esi]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040adc8
mov eax, edi
add esp, 0x7c
pop esi
pop edi
pop ebx
pop ebp
ret
push str.invalid_stoull_argument
call fcn.0040fb10
push str.stoull_argument_out_of_range
call fcn.0040fb50
call fcn.0042d843
int3