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

Disassembly:
push ebp
lea ebp, [esp - 0x1040]
mov eax, 0x1040
call fcn.004b8880
push 0xffffffffffffffff
push 0x4d65ad
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x56f710]
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.004022fa
lea eax, [ebp - 0x28]
push eax
call fcn.0046e88c
pop ecx
pop ecx
xor esi, esi
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x28]
cmp dword [eax - 0xc], esi
je 0x46eaa9
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46eaa9
lea eax, [ebp - 0x28]
push eax
mov ecx, ebx
call fcn.004025ee
jmp 0x46f0ab
push ebx
lea ecx, [ebp - 0x10]
call fcn.004022fa
lea edi, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00411ec6
push eax
lea ecx, [ebp - 0x30]
call fcn.004022fa
mov byte [ebp - 4], 2
call fcn.0049219b
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402802
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.004b62d0
push edi
lea eax, [ebp + 0xc34]
push esi
push eax
call fcn.004b62d0
push edi
lea eax, [ebp + 0x82c]
push esi
push eax
call fcn.004b62d0
push 0x208
lea eax, [ebp + 0xa2c]
push esi
push eax
call fcn.004b62d0
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.004b3e93
add esp, 0x14
lea edi, [ebp - 0x10]
call fcn.00411ec6
lea eax, [ebp + 0x82c]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0xc34]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call fcn.0040254f
push eax
lea eax, [ebp + 0xe34]
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 5
call fcn.0040c9b1
push esi
push eax
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 6
call fcn.00402125
add esp, 0x18
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.004025ee
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00402845
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
lea edi, [ebp - 0x1c]
call fcn.00411ec6
mov edi, dword [ebp - 0x1c]
push edi
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.00407898
cmp eax, 0xffffffff
je 0x46ec52
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 8
call fcn.0040254f
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 9
call fcn.00402125
add esp, 0xc
mov byte [ebp - 4], 0xa
jmp 0x46f054
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.004b3e93
add esp, 0x14
lea eax, [ebp + 0x82c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0xc34]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call fcn.0040254f
push eax
lea eax, [ebp + 0xe34]
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 0xc
call fcn.0040c9b1
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0xd
call fcn.00402125
add esp, 0x18
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xe
call fcn.004025ee
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00402845
lea edi, [ebp - 0x1c]
call fcn.00411ec6
push dword [ebp - 0x1c]
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.00407898
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x46ee66
call fcn.0049219b
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402802
push 0x1c
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 0xf
mov byte [ebp - 0x21], 0
call fcn.00406d5c
mov esi, dword [ebp - 0x2c]
cmp dword [esi - 0xc], 0
je 0x46ee5a
push 0x82c
lea eax, [ebp]
push 0
push eax
call fcn.004b62d0
add esp, 0xc
push esi
lea eax, [ebp]
call fcn.0040cbd2
lea eax, [ebp + 0xa]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0x10
call fcn.0040254f
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 0x11
call fcn.00411ec6
push dword [ebp - 0x14]
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.00407898
cmp eax, 1
jge 0x46edb3
mov byte [ebp - 0x21], 1
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
cmp byte [ebp - 0x21], 0
mov byte [ebp - 4], 0xf
je 0x46ee57
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebx]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x12
call fcn.0040254f
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x13
call fcn.00402125
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x14
call fcn.004025ee
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00402845
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.004025ee
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
jmp 0x46f090
mov esi, dword [ebp - 0x2c]
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 3
call fcn.00402845
lea edi, [ebp - 0x10]
call fcn.00411ec6
lea ecx, [ebp - 0x14]
mov eax, 0x104
push ecx
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x14], eax
call fcn.0040294d
push eax
call dword [sym.imp.USERENV.dll_GetProfilesDirectoryW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.004123c7
lea edi, [ebp - 0x1c]
call fcn.00411ec6
push 0x530c68
xor ecx, ecx
mov esi, edi
call fcn.00407898
mov dword [ebp - 0x14], eax
test eax, eax
jbe 0x46eedb
inc eax
push eax
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
call fcn.004078ef
push eax
mov ecx, edi
mov byte [ebp - 4], 0x15
call fcn.004025ee
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
jmp 0x46ef09
call fcn.0045c16c
cmp eax, 6
jae 0x46eef2
push str.documents
lea ecx, [ebp - 0x1c]
call fcn.0040272d
call fcn.0045c16c
cmp eax, 5
jbe 0x46ef09
push str.users
lea ecx, [ebp - 0x1c]
call fcn.0040272d
mov edi, dword [ebp - 0x1c]
push edi
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.00407898
cmp eax, 0xffffffff
je 0x46ef5a
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x16
call fcn.0040254f
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x17
call fcn.00402125
add esp, 0xc
mov byte [ebp - 4], 0x18
jmp 0x46f054
push str.dokumente
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.00407898
cmp eax, 0xffffffff
je 0x46efac
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x19
call fcn.0040254f
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x1a
call fcn.00402125
add esp, 0xc
mov byte [ebp - 4], 0x1b
jmp 0x46f054
lea edi, [ebp - 0x10]
call fcn.00411ec6
lea eax, [ebp + 0xe34]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040254f
push str.profile
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x1c
call fcn.0040217c
add esp, 0xc
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x1d
call fcn.004025ee
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00402845
lea edi, [ebp - 0x1c]
call fcn.00411ec6
mov edi, dword [ebp - 0x1c]
push edi
xor ecx, ecx
lea esi, [ebp - 0x10]
call fcn.00407898
cmp eax, 0xffffffff
je 0x46f08d
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040254f
mov esi, eax
lea eax, [ebp + 0x1034]
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x1e
call fcn.0040254f
push esi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 0x1f
call fcn.00402125
add esp, 0xc
mov byte [ebp - 4], 0x20
push eax
lea ecx, [ebp - 0x10]
call fcn.004025ee
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00402845
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00402845
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.004025ee
lea ecx, [edi - 0x10]
call fcn.00402845
mov ecx, dword [ebp - 0x30]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.00402845
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.00402845
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.004b228f
add ebp, 0x1040
leave
ret