Function at 0x405b10
Capabilities:
Get common file path
Set current directory

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14c]
mov eax, dword [edi + 8]
test eax, eax
jle 0x405b2f
mov eax, dword [edi + 4]
mov eax, dword [eax]
jmp 0x405b31
xor eax, eax
push eax
call fcn.0044b120
mov dword [esp + 0x18], eax
mov eax, dword [edi + 8]
add esp, 4
xor ebp, ebp
test eax, eax
jle 0x405b4e
mov ecx, dword [edi + 4]
mov eax, dword [ecx]
jmp 0x405b50
xor eax, eax
push 0
push eax
call fcn.00453380
mov esi, eax
add esp, 8
test esi, esi
je 0x405b90
push 0
push esi
call fcn.00453160
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x405b83
push ebx
call fcn.00453480
push ebx
mov ebp, eax
call fcn.00453110
add esp, 8
push esi
call fcn.00453110
add esp, 4
test ebp, ebp
jne 0x405b9d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x134
ret
mov eax, dword [edi + 8]
lea edx, [eax*4]
push edx
call fcn.004be967
mov ebx, eax
mov eax, dword [edi + 8]
add esp, 4
xor esi, esi
test eax, eax
jle 0x405c0d
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x405bd7
cmp esi, eax
jge 0x405bd3
test esi, esi
jl 0x405bd3
mov eax, dword [edi + 4]
mov eax, dword [eax + esi*4]
jmp 0x405bf2
xor eax, eax
jmp 0x405bf2
cmp esi, eax
jge 0x405be7
test esi, esi
jl 0x405be7
mov ecx, dword [edi + 4]
mov eax, dword [ecx + esi*4]
jmp 0x405be9
xor eax, eax
push eax
call fcn.0044b3b0
add esp, 4
push 0
push eax
push ebp
call fcn.00453410
add esp, 0xc
mov dword [ebx + esi*4], eax
test eax, eax
je 0x405c0d
mov eax, dword [edi + 8]
inc esi
cmp esi, eax
jl 0x405bbb
mov edi, dword [edi + 8]
cmp esi, edi
jge 0x405c31
push ebx
call fcn.004be975
mov edx, dword [ebp]
add esp, 4
push ebp
call dword [edx + 8]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x134
ret
lea ecx, [esp + 0x10]
mov eax, dword [ebp]
push ecx
push 0
push 0x4cca00
push ebx
push edi
mov edi, dword [esp + 0x15c]
push edi
push ebp
call dword [eax + 0x28]
push ebx
mov esi, eax
call fcn.004be975
xor ebp, ebp
add esp, 4
cmp esi, ebp
jl 0x405d24
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov ebx, eax
cmp ebx, ebp
je 0x405d1a
mov eax, dword [esp + 0x10]
push 4
push 0x7fff
push 1
mov edx, dword [eax]
push ebp
push ebx
push eax
call dword [edx + 0xc]
mov esi, eax
cmp esi, ebp
jl 0x405d13
mov eax, dword [esp + 0x154]
mov ecx, dword [esp + 0x150]
push ebp
push edi
push ebp
push eax
push ecx
push 0x102
push ebx
call dword [sym.imp.USER32.dll_TrackPopupMenu]
cmp eax, ebp
je 0x405d13
dec eax
lea edx, [esp + 0x3c]
and eax, 0xffff
push edx
push 0x105
mov dword [esp + 0x20], 0x24
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov esi, eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
call dword [sym.imp.USER32.dll_DestroyMenu]
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
cmp esi, ebp
pop edi
pop esi
pop ebp
pop ebx
setge al
add esp, 0x134
ret