Function at 0x496de0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1040]
mov eax, 0x1040
call fcn.004e5a80
push 0xffffffffffffffff
push 0x5055c1
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x5ff740]
xor eax, ebp
mov dword [ebp + 0x103c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
mov dword [ebp - 0x2c], esp
mov ecx, esp
push ebx
call fcn.00402305
lea eax, [ebp - 0x28]
push eax
call fcn.00496c3e
pop ecx
pop ecx
xor esi, esi
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x28]
cmp dword [eax - 0xc], esi
je 0x496e5b
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x496e5b
lea eax, [ebp - 0x28]
push eax
mov ecx, ebx
call fcn.004025da
jmp 0x49745d
push ebx
lea ecx, [ebp - 0x10]
call fcn.00402305
lea edi, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004140e6
push eax
lea ecx, [ebp - 0x30]
call fcn.00402305
mov byte [ebp - 4], 2
call fcn.004be6f3
push eax
lea ecx, [ebp - 0x1c]
call fcn.004027f9
xor eax, eax
mov byte [ebp - 4], 3
lea edi, [ebp + 0x1034]
stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, 0x200
push edi
lea eax, [ebp + 0xe34]
push esi
push eax
call fcn.004e38a0
push edi
lea eax, [ebp + 0xc34]
push esi
push eax
call fcn.004e38a0
push edi
lea eax, [ebp + 0x82c]
push esi
push eax
call fcn.004e38a0
push 0x208
lea eax, [ebp + 0xa2c]
push esi
push eax
call fcn.004e38a0
add esp, 0x30
push 0x103
lea eax, [ebp + 0xa2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp + 0x82c]
push eax
lea eax, [ebp + 0xc34]
push eax
lea eax, [ebp + 0xe34]
push eax
lea eax, [ebp + 0x1034]
push eax
lea eax, [ebp + 0xa2c]
push eax
call fcn.004e0033
add esp, 0x14
lea edi, [ebp - 0x10]
call fcn.004140e6
lea eax, [ebp + 0x82c]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0xc34]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call fcn.0040253b
push eax
lea eax, [ebp + 0xe34]
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 5
call fcn.0040dc86
push esi
push eax
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 6
call fcn.00402130
add esp, 0x18
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.004025da
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040285b
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
lea edi, [ebp - 0x1c]
call fcn.004140e6
mov edi, dword [ebp - 0x1c]
push edi
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.0040788c
cmp eax, 0xffffffff
je 0x497004
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 8
call fcn.0040253b
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 9
call fcn.00402130
add esp, 0xc
mov byte [ebp - 4], 0xa
jmp 0x497406
push 0x103
lea eax, [ebp + 0xa2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp + 0x82c]
push eax
lea eax, [ebp + 0xc34]
push eax
lea eax, [ebp + 0xe34]
push eax
lea eax, [ebp + 0x1034]
push eax
lea eax, [ebp + 0xa2c]
push eax
call fcn.004e0033
add esp, 0x14
lea eax, [ebp + 0x82c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0xc34]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call fcn.0040253b
push eax
lea eax, [ebp + 0xe34]
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 0xc
call fcn.0040dc86
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0xd
call fcn.00402130
add esp, 0x18
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xe
call fcn.004025da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040285b
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.0040285b
lea edi, [ebp - 0x1c]
call fcn.004140e6
push dword [ebp - 0x1c]
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.0040788c
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x497218
call fcn.004be6f3
push eax
lea ecx, [ebp - 0x2c]
call fcn.004027f9
push 0x1c
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 0xf
mov byte [ebp - 0x21], 0
call fcn.00406d50
mov esi, dword [ebp - 0x2c]
cmp dword [esi - 0xc], 0
je 0x49720c
push 0x82c
lea eax, [ebp]
push 0
push eax
call fcn.004e38a0
add esp, 0xc
push esi
lea eax, [ebp]
call fcn.0040de7e
lea eax, [ebp + 0xa]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0x10
call fcn.0040253b
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 0x11
call fcn.004140e6
push dword [ebp - 0x14]
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.0040788c
cmp eax, 1
jge 0x497165
mov byte [ebp - 0x21], 1
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040285b
cmp byte [ebp - 0x21], 0
mov byte [ebp - 4], 0xf
je 0x497209
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebx]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x12
call fcn.0040253b
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x13
call fcn.00402130
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x14
call fcn.004025da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040285b
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040285b
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.004025da
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
jmp 0x497442
mov esi, dword [ebp - 0x2c]
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 3
call fcn.0040285b
lea edi, [ebp - 0x10]
call fcn.004140e6
lea ecx, [ebp - 0x14]
mov eax, 0x104
push ecx
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x14], eax
call fcn.00402963
push eax
call dword [sym.imp.USERENV.dll_GetProfilesDirectoryW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.004145ba
lea edi, [ebp - 0x1c]
call fcn.004140e6
push 0x5b2dfc
xor ecx, ecx
mov esi, edi
call fcn.0040788c
mov dword [ebp - 0x14], eax
test eax, eax
jbe 0x49728d
inc eax
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.004078e3
push eax
mov ecx, edi
mov byte [ebp - 4], 0x15
call fcn.004025da
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
jmp 0x4972bb
call fcn.0047876d
cmp eax, 6
jae 0x4972a4
push str.documents
lea ecx, [ebp - 0x1c]
call fcn.00402719
call fcn.0047876d
cmp eax, 5
jbe 0x4972bb
push str.users
lea ecx, [ebp - 0x1c]
call fcn.00402719
mov edi, dword [ebp - 0x1c]
push edi
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.0040788c
cmp eax, 0xffffffff
je 0x49730c
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x16
call fcn.0040253b
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x17
call fcn.00402130
add esp, 0xc
mov byte [ebp - 4], 0x18
jmp 0x497406
push str.dokumente
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.0040788c
cmp eax, 0xffffffff
je 0x49735e
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x19
call fcn.0040253b
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x1a
call fcn.00402130
add esp, 0xc
mov byte [ebp - 4], 0x1b
jmp 0x497406
lea edi, [ebp - 0x10]
call fcn.004140e6
lea eax, [ebp + 0xe34]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040253b
push str.profile
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x1c
call fcn.00402187
add esp, 0xc
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x1d
call fcn.004025da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040285b
lea edi, [ebp - 0x1c]
call fcn.004140e6
mov edi, dword [ebp - 0x1c]
push edi
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.0040788c
cmp eax, 0xffffffff
je 0x49743f
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040253b
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x1e
call fcn.0040253b
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x1f
call fcn.00402130
add esp, 0xc
mov byte [ebp - 4], 0x20
push eax
lea ecx, [ebp - 0x10]
call fcn.004025da
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040285b
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040285b
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.004025da
lea ecx, [edi - 0x10]
call fcn.0040285b
mov ecx, dword [ebp - 0x30]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.0040285b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp + 0x103c]
xor ecx, ebp
call fcn.004de422
add ebp, 0x1040
leave
ret