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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c8
mov eax, dword [0x4ccbf8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x5c4], eax
xor edi, edi
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x5c8], eax
test ecx, ecx
je 0x41c8a6
mov edi, 0x4e4e48
mov edx, ecx
sub edi, ecx
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [edi + edx - 1], al
test al, al
jne 0x41c880
lea edx, [ebp - 0x20c]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x41c895
xor edi, edi
jmp 0x41c8f4
test esi, esi
je 0x41c8e6
cmp byte [esi], 0
je 0x41c8e6
mov edx, 0x4e4e48
mov ecx, esi
sub edx, esi
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x41c8c0
lea edx, [ebp - 0x20c]
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x41c8d7
jmp 0x41c8f8
mov byte [0x4e4e48], 0
mov byte [ebp - 0x20c], 0
test esi, esi
je 0x41c904
cmp byte [esi], 0
lea edi, [ebp - 0x20c]
cmovne edi, esi
test ebx, ebx
je 0x41c90d
cmp byte [ebx], 0
jne 0x41c912
mov ebx, str.All_files___._.Ini_files___.ini_.iniLog_files___.log_.logDatabase_files___.mdb_.mdbText_files___.txt_.txtExecutables__.exe_.exe
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c917
sub ecx, edx
cmp ecx, 0x103
jae 0x41c93b
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c930
sub ecx, edx
jmp 0x41c940
mov ecx, 0x103
push ecx
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0041d160
add esp, 0xc
mov cl, byte [ebp + eax - 0x109]
xor eax, eax
cmp byte [ebp - 0x108], al
je 0x41c989
cmp byte [ebp + eax - 0x108], cl
jne 0x41c97e
cmp eax, 0x104
jae 0x41cb00
mov byte [ebp + eax - 0x108], 0
inc eax
cmp byte [ebp + eax - 0x108], 0
jne 0x41c962
push 0x58
lea eax, [ebp - 0x5c0]
push 0
push eax
call fcn.004811a0
mov eax, dword [ebp - 0x5c4]
add esp, 0xc
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x5bc], eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x5b4], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x5a8], eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x5a4], eax
mov eax, dword [ebp - 0x5c8]
mov dword [ebp - 0x590], eax
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x59c], eax
mov eax, ebx
and eax, 4
mov dword [ebp - 0x5c0], 0x58
shl eax, 6
or eax, 4
mov dword [ebp - 0x5a0], 0x104
mov dword [ebp - 0x58c], eax
lea eax, [ebp - 0x338]
push eax
push 0x12c
mov dword [ebp - 0x598], 0x104
mov dword [ebp - 0x594], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test edi, edi
je 0x41ca4c
cmp byte [edi], 0
je 0x41ca4c
push 0
push edi
push 0x4e4e48
call fcn.00422060
push eax
push 0
call fcn.0041da60
add esp, 0x14
mov byte [0x4e4e48], 0
test bl, 1
je 0x41caad
lea eax, [ebp - 0x5c0]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
je 0x41caad
test esi, esi
je 0x41ca93
push 1
push dword [ebp - 0x5a4]
lea eax, [ebp - 0x568]
push eax
call fcn.00422060
add esp, 0xc
sub esi, eax
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [esi + eax - 1], cl
test cl, cl
jne 0x41ca86
mov ecx, dword [ebp - 0x5a4]
mov edx, 0x4e4e48
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x41caa0
pop edi
pop esi
test bl, 2
pop ebx
je 0x41cae0
lea eax, [ebp - 0x5c0]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameA]
test eax, eax
je 0x41cae0
mov ecx, dword [ebp - 0x5a4]
mov edx, 0x4e4e48
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x41cad3
lea eax, [ebp - 0x338]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [ebp - 4]
mov eax, 0x4e4e48
xor ecx, ebp
call fcn.0047f41c
mov esp, ebp
pop ebp
ret
call fcn.0047f54c
int3