Function at 0x406688
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 1
mov dword [ebp - 0xc], 4
mov dword [ebp - 0x118], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x220]
push eax
mov ecx, dword [0x41a858]
push ecx
push str._spftw_d.pkg
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
lea eax, [ebp - 0x114]
push eax
call fcn.00401328
add esp, 8
test eax, eax
je 0x4067dc
lea ecx, [ebp - 0x118]
push ecx
lea edx, [ebp - 0x114]
push edx
call fcn.004010d4
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jb 0x40673d
cmp dword [ebp - 0x118], 0
jl 0x406738
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jmp 0x4067da
cmp dword [ebp + 0x10], 0
je 0x4067d3
push 0x104
lea ecx, [ebp - 0x328]
push ecx
push 0x139
mov edx, dword [0x41a8ec]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x104
lea eax, [ebp - 0x328]
push eax
push 0x139
push 0x416348
call fcn.00401a3d
add esp, 0x10
push 0x104
lea ecx, [ebp - 0x42c]
push ecx
push 1
mov edx, dword [0x41a8ec]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x104
lea eax, [ebp - 0x42c]
push eax
push 1
push 0x416350
call fcn.00401a3d
add esp, 0x10
push 0x10
lea ecx, [ebp - 0x42c]
push ecx
lea edx, [ebp - 0x328]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x406a2c
jmp 0x4067e1
jmp 0x4068b5
cmp dword [ebp - 0x118], 0
jl 0x4067fe
mov ecx, dword [ebp - 0x220]
add ecx, 1
mov dword [ebp - 0x220], ecx
jmp 0x4068a8
cmp dword [ebp - 0x118], 0xfffffff6
jne 0x4068a8
push 0x104
lea edx, [ebp - 0x738]
push edx
push 0x13e
mov eax, dword [0x41a8ec]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x104
lea ecx, [ebp - 0x738]
push ecx
push 0x13e
push 0x416358
call fcn.00401a3d
add esp, 0x10
push 0x104
lea edx, [ebp - 0x634]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 4
lea eax, [ebp - 0x634]
push eax
lea ecx, [ebp - 0x634]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [ebp - 0x634]
push edx
lea eax, [ebp - 0x738]
push eax
lea ecx, [ebp - 0x530]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x10
mov edx, dword [0x41a890]
push edx
lea eax, [ebp - 0x530]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4068b5
mov edx, 1
test edx, edx
jne 0x4066cb
cmp dword [ebp - 0x118], 0xfffffff6
jne 0x4068c9
mov eax, dword [ebp - 0x224]
jmp 0x406a2c
mov dword [ebp - 0xc], 4
mov eax, dword [ebp + 8]
push eax
call fcn.00401395
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4068f4
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
sbb edx, edx
inc edx
mov dword [ebp - 0x224], edx
cmp dword [ebp - 0x224], 0
jne 0x406a13
cmp dword [ebp + 0x10], 0
je 0x406a13
mov dword [ebp - 0x844], 0
mov dword [ebp - 0x840], 0
mov byte [ebp - 0xa4c], 0
push 0x104
lea eax, [ebp - 0xa4c]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00406a30
add esp, 0xc
fstp qword [ebp - 0x844]
push 0x104
lea edx, [ebp - 0x948]
push edx
push 0x13a
mov eax, dword [0x41a8ec]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
cmp dword [0x41a854], 0
je 0x4069c8
push 0x104
lea ecx, [ebp - 0x948]
push ecx
push 0x13a
push 0x416360
call fcn.00401a3d
add esp, 0x10
push 0x104
lea edx, [ebp - 0x21c]
push edx
push 0x144
push 0x416368
call fcn.00401a3d
add esp, 0x10
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x948]
push ecx
push str._s_n_n_s
lea edx, [ebp - 0x948]
push edx
call fcn.0040e930
add esp, 0x10
lea eax, [ebp - 0xa4c]
push eax
mov ecx, dword [ebp - 0x840]
push ecx
mov edx, dword [ebp - 0x844]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x948]
push ecx
lea edx, [ebp - 0x83c]
push edx
call fcn.0040e930
add esp, 0x18
push 0x15
mov eax, dword [0x41a890]
push eax
lea ecx, [ebp - 0x83c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 4
jne 0x406a26
cmp dword [ebp - 0x224], 0
je 0x4068d0
mov eax, dword [ebp - 0x224]
mov esp, ebp
pop ebp
ret