Function at 0x408c04
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe14
push ebx
push esi
push edi
mov word [ebp - 2], cx
mov ebx, edx
mov esi, eax
mov edi, dword [ebp + 8]
push 0x4c
push 0
push edi
call fcn.0040110c
add esp, 0xc
test esi, esi
je 0x408c31
cmp byte [esi], 0
jne 0x408c38
xor eax, eax
jmp 0x408fad
mov eax, esi
call fcn.004078ec
test al, al
je 0x408c6e
push esi
push edi
xor eax, eax
mov edi, esi
or ecx, 0xffffffff
lea esi, [ebp - 0x94]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
jmp 0x408caa
push esi
push edi
xor eax, eax
or ecx, 0xffffffff
mov edi, 0x40c1e7
lea esi, [ebp - 0x94]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x94]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push esi
push eax
call fcn.0040113c
add esp, 8
push esi
push edi
xor eax, eax
mov edi, ebx
or ecx, 0xffffffff
lea esi, [ebp - 0x124]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
xor eax, eax
mov dword [edi + 0x44], eax
mov eax, dword [edi + 0x44]
test eax, eax
je 0x408ce6
push eax
call fcn.00403818
pop ecx
push 0x40c286
lea edx, [ebp - 0x94]
push edx
call fcn.00403b44
add esp, 8
mov ebx, eax
mov dword [edi + 0x44], ebx
test ebx, ebx
jne 0x408d64
cmp dword [0x40d5d4], 2
je 0x408d1d
lea eax, [ebp - 0x1ec]
push eax
push 0xc8
call sub.KERNEL32.dll_GetCurrentDirectoryA
mov eax, dword [0x40d5d4]
cmp eax, 2
je 0x408d2c
cmp eax, 3
jne 0x408d47
lea ecx, [ebp - 0x124]
lea edx, [ebp - 0x94]
mov eax, dword [0x40c278]
call fcn.004072d8
mov byte [ebp - 3], al
jmp 0x408d64
lea edx, [ebp - 0x94]
push edx
push 0xa
push 0x403
mov ecx, dword [0x40c278]
push ecx
call sub.USER32.dll_SendMessageA
mov byte [ebp - 3], al
mov eax, dword [edi + 0x44]
test eax, eax
jne 0x408d75
cmp byte [ebp - 3], 0
jne 0x408ce6
test eax, eax
jne 0x408d80
xor eax, eax
jmp 0x408fad
mov edx, 0x40c1e7
mov eax, esi
call fcn.00407904
mov eax, dword [edi + 0x44]
call fcn.00408bb0
push 0
mov edx, dword [0x40c078]
push edx
mov ecx, dword [edi + 0x44]
push ecx
call fcn.00403e4c
add esp, 0xc
mov eax, dword [edi + 0x44]
push eax
push 0x24
push 1
push edi
call fcn.00403dbc
add esp, 0x10
mov ecx, dword [ebp + 0xc]
mov dx, word [ebp - 2]
mov eax, edi
call fcn.00408b1c
mov ebx, eax
xor eax, eax
mov al, bl
cmp eax, 1
sbb edx, edx
neg edx
test edx, edx
je 0x408e01
lea ecx, [ebp - 0x94]
xor eax, eax
mov al, byte [0x40c1e6]
push ecx
push eax
mov edx, dword [0x40c278]
push 0x403
push edx
call sub.USER32.dll_SendMessageA
test eax, eax
jne 0x408cd8
xor ecx, ecx
mov cl, bl
cmp ecx, 1
sbb eax, eax
neg eax
test eax, eax
je 0x408e21
mov edx, dword [edi + 0x44]
push edx
call fcn.00403818
pop ecx
xor eax, eax
jmp 0x408fad
push 0
mov ecx, dword [0x40c278]
movzx edx, word [edi + 0x22]
push edx
push 0x406
push ecx
call sub.USER32.dll_SendMessageA
push 0
mov eax, dword [0x40c078]
push eax
mov edx, dword [edi + 0x44]
push edx
call fcn.00403e4c
add esp, 0xc
lea eax, [edi + 0x24]
mov edx, dword [edi + 0x10]
call fcn.004072f8
mov ebx, eax
mov dword [edi + 0x28], ebx
test ebx, ebx
jne 0x408e8c
lea eax, [ebp - 0x94]
push eax
push 9
push 0x403
mov edx, dword [0x40c278]
push edx
call sub.USER32.dll_SendMessageA
mov ecx, dword [edi + 0x44]
push ecx
call fcn.00403818
pop ecx
xor eax, eax
jmp 0x408fad
mov edx, dword [edi + 0x44]
push edx
mov ecx, dword [edi + 0x10]
push ecx
push 1
mov eax, dword [edi + 0x28]
push eax
call fcn.00403dbc
add esp, 0x10
cmp eax, dword [edi + 0x10]
je 0x408ed2
lea edx, [ebp - 0x94]
push edx
push 0xb
push 0x403
mov ecx, dword [0x40c278]
push ecx
call sub.USER32.dll_SendMessageA
mov eax, dword [edi + 0x44]
push eax
call fcn.00403818
pop ecx
xor eax, eax
jmp 0x408fad
mov eax, dword [edi + 0x28]
add eax, 0x24
mov ecx, edi
mov dx, word [edi + 0x1e]
call fcn.00408aa8
mov dword [edi + 0x30], eax
push 0
mov eax, dword [edi + 0x10]
add eax, dword [0x40c078]
push eax
mov edx, dword [edi + 0x44]
push edx
call fcn.00403e4c
add esp, 0xc
mov ecx, dword [edi + 0x30]
mov esi, dword [ecx]
sub esi, dword [edi + 0x10]
push esi
call fcn.00406360
pop ecx
mov ebx, eax
mov dword [edi + 0x2c], ebx
test ebx, ebx
jne 0x408f50
lea eax, [ebp - 0x94]
push eax
push 9
push 0x403
mov edx, dword [0x40c278]
push edx
call sub.USER32.dll_SendMessageA
mov ecx, dword [edi + 0x24]
push ecx
call sub.KERNEL32.dll_GlobalUnlock
mov eax, dword [edi + 0x24]
push eax
call sub.KERNEL32.dll_GlobalFree
mov edx, dword [edi + 0x44]
push edx
call fcn.00403818
pop ecx
xor eax, eax
jmp 0x408fad
mov edx, dword [edi + 0x44]
push edx
push esi
push 1
mov ecx, dword [edi + 0x2c]
push ecx
call fcn.00403dbc
add esp, 0x10
cmp esi, eax
je 0x408fab
lea eax, [ebp - 0x94]
push eax
push 0xb
push 0x403
mov edx, dword [0x40c278]
push edx
call sub.USER32.dll_SendMessageA
mov ecx, dword [edi + 0x24]
push ecx
call sub.KERNEL32.dll_GlobalUnlock
mov eax, dword [edi + 0x24]
push eax
call sub.KERNEL32.dll_GlobalFree
mov edx, dword [edi + 0x2c]
push edx
call fcn.00406258
pop ecx
mov ecx, dword [edi + 0x44]
push ecx
call fcn.00403818
pop ecx
xor eax, eax
jmp 0x408fad
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8