Function at 0x476fef
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48c
mov eax, dword [0x4eb664]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 8]
xor eax, eax
push 0x208
mov word [ebp - 0x210], ax
xor ebx, ebx
lea eax, [ebp - 0x20e]
push ebx
push eax
call fcn.004921d0
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x47704d
push ebx
push 1
lea ecx, [ebp + 0xc]
call fcn.00405ac5
jmp 0x47729d
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x477056
sub ecx, edx
sar ecx, 1
je 0x47708f
cmp word [ebp + ecx*2 - 0x212], 0x5c
jne 0x47708f
lea ecx, [ecx*2 - 2]
cmp ecx, 0x20a
jae 0x4772ad
xor eax, eax
mov word [ebp + ecx - 0x210], ax
push esi
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x434]
call fcn.0040513a
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x484]
call fcn.0047a0b4
push ebx
push 1
lea ecx, [ebp - 0x434]
call fcn.00405ac5
xor eax, eax
lea ecx, [ebp - 0x48c]
mov dword [ebp - 0x440], 7
mov dword [ebp - 0x444], ebx
mov word [ebp - 0x454], ax
mov dword [ebp - 0x48c], ebx
mov dword [ebp - 0x488], ebx
call fcn.0047756e
push str.except_why
lea ecx, [ebp - 0x434]
mov dword [ebp - 0x48c], eax
call fcn.0040513a
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x48c]
call fcn.00476e2e
mov ebx, 0x4d4500
push ebx
mov esi, eax
call fcn.00405113
pop ecx
push eax
push ebx
mov ecx, esi
call fcn.0040509a
push 0
push 1
lea ecx, [ebp - 0x434]
call fcn.00405ac5
push str.try_except_count
lea ecx, [ebp - 0x434]
call fcn.0040513a
lea eax, [ebp - 0x434]
push eax
lea ecx, [ebp - 0x48c]
call fcn.00476e2e
push ebx
mov esi, eax
call fcn.00405113
pop ecx
push eax
push ebx
mov ecx, esi
call fcn.0040509a
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x434]
call fcn.00405ac5
xor eax, eax
push 0x208
mov word [ebp - 0x41c], ax
lea eax, [ebp - 0x41a]
push ebx
push eax
call fcn.004921d0
add esp, 0xc
lea eax, [ebp - 0x41c]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x46c]
call fcn.0040513a
cmp dword [ebp - 0x458], 8
lea eax, [ebp - 0x48c]
push eax
lea eax, [ebp - 0x454]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x484]
push eax
lea esi, [ebp - 0x46c]
cmovae esi, dword [ebp - 0x46c]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push esi
xor esi, esi
inc esi
push esi
call fcn.004787c0
add esp, 0x20
test al, al
je 0x477262
push ebx
lea eax, [ebp - 0x43c]
push eax
lea eax, [ebp - 0x454]
push eax
mov word [ebp - 0x43c], bx
mov byte [ebp - 0x43a], bl
mov dword [ebp - 0x438], ebx
mov byte [ebp - 0x434], bl
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x424], ebx
mov byte [ebp - 0x420], bl
call fcn.0047ebd0
add esp, 0xc
push ebx
push esi
lea ecx, [ebp - 0x46c]
call fcn.00405ac5
lea ecx, [ebp - 0x48c]
call fcn.00476dd6
push ebx
push esi
lea ecx, [ebp - 0x454]
call fcn.00405ac5
lea ecx, [ebp - 0x484]
call fcn.0047a0fe
push ebx
push esi
lea ecx, [ebp + 0xc]
call fcn.00405ac5
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0048f059
leave
ret 0x1c
call fcn.00492b3a
int3