Function at 0x405500
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x524
mov eax, dword [0x418814]
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push edi
mov edi, 1
push edi
push eax
lea ecx, [ebp - 0x31c]
xor ebx, ebx
push str._spftw_d.pkg
push ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call esi
add esp, 0x10
lea edx, [ebp - 0x31c]
push ebx
push edx
call fcn.00401220
add esp, 8
test eax, eax
je 0x405647
lea eax, [ebp - 8]
lea ecx, [ebp - 0x31c]
push eax
push ecx
call fcn.00401090
mov ecx, dword [ebp - 8]
add esp, 8
test ecx, ecx
jl 0x405578
mov edx, dword [ebp - 4]
add edx, eax
test ecx, ecx
mov dword [ebp - 4], edx
jl 0x405578
inc edi
jmp 0x40557d
cmp ecx, 0xfffffff6
je 0x4055b0
mov edx, dword [0x418814]
push edi
push edx
lea eax, [ebp - 0x31c]
push str._spftw_d.pkg
push eax
call esi
add esp, 0x10
lea ecx, [ebp - 0x31c]
push 0
push ecx
call fcn.00401220
add esp, 8
test eax, eax
jne 0x40554f
jmp 0x405647
mov eax, dword [0x4188ac]
lea edx, [ebp - 0x218]
push 0x104
push edx
push 0x13e
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [ebp - 0x218]
push 0x104
push ecx
push 0x13e
push 0x414300
call fcn.00401810
add esp, 0x10
lea edx, [ebp - 0x114]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x114]
push 4
lea ecx, [ebp - 0x114]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [ebp - 0x114]
lea eax, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x420]
push eax
push ecx
call esi
mov edx, dword [0x41884c]
mov ecx, dword [ebp + 0xc]
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x10
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [ebp - 8], 0xfffffff6
jne 0x405656
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
mov esi, 4
push edi
call fcn.00401270
add esp, 4
test eax, eax
je 0x405671
cmp eax, dword [ebp - 4]
sbb ebx, ebx
inc ebx
test ebx, ebx
jne 0x40576c
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40576c
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x218]
push 0x104
push edx
push eax
mov byte [ebp - 0x218], bl
call fcn.00405790
mov edx, dword [0x4188ac]
add esp, 0xc
fstp qword [ebp - 0x10]
lea ecx, [ebp - 0x114]
push 0x104
push ecx
push 0x13a
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
mov eax, dword [0x418810]
test eax, eax
je 0x40572a
lea eax, [ebp - 0x114]
push 0x104
push eax
push 0x13a
push 0x414308
call fcn.00401810
add esp, 0x10
lea ecx, [ebp - 0x524]
push 0x104
push ecx
push 0x144
push 0x414310
call fcn.00401810
add esp, 0x10
lea edx, [ebp - 0x524]
lea eax, [ebp - 0x114]
lea ecx, [ebp - 0x114]
push edx
push eax
push str._s_n_n_s
push ecx
call fcn.0040cbb0
add esp, 0x10
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x218]
push edx
push eax
push ecx
lea edx, [ebp - 0x114]
push edi
lea eax, [ebp - 0x420]
push edx
push eax
call fcn.0040cbb0
mov ecx, dword [0x41884c]
mov eax, dword [ebp + 0xc]
add esp, 0x18
lea edx, [ebp - 0x420]
push 0x15
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, eax
cmp esi, 4
jne 0x405779
test ebx, ebx
je 0x40565e
pop edi
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret