Function at 0x405361
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x518
mov eax, dword [0x41f29c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x40c]
mov esi, 0x100
mov ebx, edx
push esi
push eax
push esi
mov esi, dword [0x4182a0]
lea eax, [ebp - 0x104]
xor edx, edx
push eax
push edx
push edx
push edx
push edx
push ecx
mov dword [ebp - 0x518], edx
call esi
add esp, 0x24
lea ecx, [ebp - 0x104]
call fcn.00405abc
cmp byte [ebp - 0x40c], 0x2e
jne 0x4053c8
lea ecx, [ebp - 0x40b]
call fcn.00405abc
xor ecx, ecx
lea eax, [ebp - 0x30c]
push eax
push ecx
push ecx
push 0x20
push ecx
mov byte [ebp - 0x30c], cl
call dword [section..data]
test eax, eax
jns 0x4053f8
lea eax, [ebp - 0x30c]
push eax
push 0x208
call dword [0x4180cc]
xor eax, eax
push eax
push eax
push eax
push eax
push 0x100
lea eax, [ebp - 0x50c]
push eax
push 3
lea eax, [ebp - 0x514]
push eax
lea eax, [ebp - 0x30c]
push eax
call esi
add esp, 0x24
lea eax, [ebp - 0x104]
mov edx, 0x208
lea ecx, [ebp - 0x30c]
push eax
call fcn.0040518f
lea eax, [ebp - 0x104]
push eax
call dword [0x4180d8]
mov esi, eax
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x30c]
mov dword [ebp - 0x510], esi
push eax
lea eax, [ebp - 0x50c]
push eax
lea eax, [ebp - 0x514]
push eax
push 0x101
push ebx
call dword [0x4182a4]
add esp, 0x18
test eax, eax
jne 0x405605
push ebx
call dword [0x4180c8]
cmp eax, 0xffffffff
je 0x405493
test al, 0x10
jne 0x405493
xor eax, eax
inc eax
jmp 0x405495
xor eax, eax
test al, al
jne 0x4054c7
push 1
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [0x41f284]
cmp eax, 0xffffffff
je 0x4054c7
push eax
call dword [0x4180c0]
xor eax, eax
jmp 0x405611
mov eax, dword [ebp - 0x518]
inc eax
push eax
mov dword [ebp - 0x518], eax
lea eax, [ebp - 0x104]
push eax
push str._s_x
lea eax, [ebp - 0x30c]
push 0x208
push eax
call fcn.00401717
add esp, 0x14
lea eax, [ebp - 0x30c]
push eax
call dword [0x4180d8]
jmp 0x405579
test esi, esi
jle 0x405605
lea eax, [ebp - 0x104]
add eax, esi
push eax
lea eax, [ebp - 0x104]
push eax
call dword [0x41f150]
mov esi, eax
push esi
call dword [0x41f21c]
test eax, eax
mov eax, dword [ebp - 0x510]
je 0x405536
dec eax
push dword [ebp - 0x518]
dec eax
mov byte [esi], 0
mov dword [ebp - 0x510], eax
lea eax, [ebp - 0x104]
push eax
push str._s_x
lea eax, [ebp - 0x30c]
push 0x208
push eax
call fcn.00401717
add esp, 0x14
lea eax, [ebp - 0x30c]
push eax
call dword [0x4180d8]
mov esi, dword [ebp - 0x510]
cmp eax, 0xff
jge 0x405504
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x30c]
push eax
lea eax, [ebp - 0x50c]
push eax
lea eax, [ebp - 0x514]
push eax
push 0x101
push ebx
call dword [0x4182a4]
add esp, 0x18
test eax, eax
jne 0x405605
push ebx
call dword [0x4180c8]
cmp eax, 0xffffffff
je 0x4055c4
test al, 0x10
jne 0x4055c4
xor eax, eax
inc eax
jmp 0x4055c6
xor eax, eax
test al, al
jne 0x4054c7
call dword [0x41810c]
cmp eax, 3
je 0x405605
push 1
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [0x41f284]
mov esi, eax
push esi
call dword [0x4180c0]
cmp esi, 0xffffffff
jne 0x4054c0
push 0x80004005
mov ecx, edi
call fcn.0040c69e
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414f12
mov esp, ebp
pop ebp
ret 0xc