Function at 0x405b90
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 0x405baf
mov eax, dword [edi + 4]
mov eax, dword [eax]
jmp 0x405bb1
xor eax, eax
push eax
call fcn.00443ac0
mov dword [esp + 0x18], eax
mov eax, dword [edi + 8]
add esp, 4
xor ebp, ebp
test eax, eax
jle 0x405bce
mov ecx, dword [edi + 4]
mov eax, dword [ecx]
jmp 0x405bd0
xor eax, eax
push 0
push eax
call fcn.0044b710
mov esi, eax
add esp, 8
test esi, esi
je 0x405c10
push 0
push esi
call fcn.0044b4f0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x405c03
push ebx
call fcn.0044b810
push ebx
mov ebp, eax
call fcn.0044b4a0
add esp, 8
push esi
call fcn.0044b4a0
add esp, 4
test ebp, ebp
jne 0x405c1d
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.004c7e90
mov ebx, eax
mov eax, dword [edi + 8]
add esp, 4
xor esi, esi
test eax, eax
jle 0x405c8d
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x405c57
cmp esi, eax
jge 0x405c53
test esi, esi
jl 0x405c53
mov eax, dword [edi + 4]
mov eax, dword [eax + esi*4]
jmp 0x405c72
xor eax, eax
jmp 0x405c72
cmp esi, eax
jge 0x405c67
test esi, esi
jl 0x405c67
mov ecx, dword [edi + 4]
mov eax, dword [ecx + esi*4]
jmp 0x405c69
xor eax, eax
push eax
call fcn.00443d50
add esp, 4
push 0
push eax
push ebp
call fcn.0044b7a0
add esp, 0xc
mov dword [ebx + esi*4], eax
test eax, eax
je 0x405c8d
mov eax, dword [edi + 8]
inc esi
cmp esi, eax
jl 0x405c3b
mov edi, dword [edi + 8]
cmp esi, edi
jge 0x405cb1
push ebx
call fcn.004c7e56
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 0x4d8a18
push ebx
push edi
mov edi, dword [esp + 0x15c]
push edi
push ebp
call dword [eax + 0x28]
push ebx
mov esi, eax
call fcn.004c7e56
xor ebp, ebp
add esp, 4
cmp esi, ebp
jl 0x405da4
call dword [sym.imp.user32.dll_CreatePopupMenu]
mov ebx, eax
cmp ebx, ebp
je 0x405d9a
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 0x405d93
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 0x405d93
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