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

Disassembly:
mov al, byte [0x54a460]
sub esp, 0x47c
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor ebx, ebx
cmp al, bl
push esi
push edi
jne 0x42c994
push 0x54a460
push 0x104
call ebp
or ecx, 0xffffffff
xor eax, eax
mov edi, str._savedata
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, 0x54a460
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00451c70
call fcn.00459590
lea eax, [esp + 0x388]
push eax
push 0x103
call ebp
mov ebp, dword [esp + 0x494]
cmp ebp, ebx
je 0x42cae1
lea ecx, [esp + 0x14]
push ecx
call fcn.00467064
lea edx, [esp + 0x74]
push edx
mov byte [esp + 0x1e], bl
mov byte [esp + 0x21], bl
call fcn.00466feb
mov edi, dword [esp + 0x4a0]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
lea edx, [esp + 0x18c]
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18c]
push 0x4af8f4
push ecx
mov byte [esp + 0x82], bl
mov byte [esp + 0x85], bl
call fcn.0046712c
add esp, 0x10
test eax, eax
je 0x42ca41
lea edx, [esp + 0x184]
push 0x4af8f4
push edx
call fcn.0046712c
add esp, 8
mov byte [eax], bl
lea eax, [esp + 0x73]
push eax
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x1f]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2a]
push ecx
lea edx, [esp + 0x198]
push edx
lea eax, [esp + 0x98]
push 0x4af8d4
push eax
call fcn.00466e90
mov al, byte [esp + 0xa0]
add esp, 0x20
cmp al, bl
lea esi, [esp + 0x80]
je 0x42caf1
mov cl, byte [esi]
xor ebp, ebp
mov eax, 0x4af83c
cmp cl, byte [eax]
je 0x42caa3
add eax, 4
inc ebp
cmp eax, 0x4af868
jb 0x42ca92
jmp 0x42cac7
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esi + 1]
push esi
push ecx
call fcn.004678c0
mov dx, word [ebp*4 + 0x4af83e]
add esp, 0xc
mov word [esi], dx
push esi
call fcn.0046830b
mov esi, eax
mov al, byte [esi]
add esp, 4
cmp al, bl
jne 0x42ca89
mov ebp, dword [esp + 0x494]
jmp 0x42caf1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x80]
rep stosd dword es:[edi], eax
xor eax, eax
mov ecx, 0x13
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], 0x4c
call fcn.004517c0
cmp ebp, ebx
mov dword [esp + 0x28], eax
lea eax, [esp + 0x80]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 0x4af868
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0x103
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 0x54a460
mov dword [esp + 0x54], 0x4af8b4
jne 0x42cb5e
mov dword [esp + 0x54], 0x4af894
mov ecx, ebp
neg ecx
sbb ecx, ecx
and ecx, 2
add ecx, 4
cmp ebp, ebx
mov dword [esp + 0x58], ecx
mov word [esp + 0x5c], bx
mov word [esp + 0x5e], bx
mov dword [esp + 0x60], 0x4af890
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
jne 0x42cb9c
lea edx, [esp + 0x24]
push edx
call sub.comdlg32.dll_GetOpenFileNameA
jmp 0x42cba6
lea eax, [esp + 0x24]
push eax
call sub.comdlg32.dll_GetSaveFileNameA
lea ecx, [esp + 0x388]
push ecx
mov esi, eax
mov byte [esp + 0x186], bl
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call fcn.00459550
call fcn.00426580
cmp esi, ebx
je 0x42cc8e
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xc0
jb 0x42cbf2
push 0x4ad30c
jmp 0x42cc9c
push ebx
push ebx
lea edx, [esp + 0x290]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x90]
push ecx
call fcn.00467772
lea edx, [esp + 0x29c]
push edx
lea eax, [esp + 0x28]
push eax
push str._d_d
push 0x54a460
call fcn.00466e90
or ecx, 0xffffffff
xor eax, eax
add esp, 0x24
mov edi, 0x54a460
repne scasb al, byte es:[edi]
not ecx
mov al, byte [ecx + 0x54a45e]
dec ecx
cmp al, 0x5c
jne 0x42cc5a
or ecx, 0xffffffff
mov edi, 0x54a460
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov byte [ecx + 0x54a45e], bl
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x490]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x47c
ret
call sub.comdlg32.dll_CommDlgExtendedError
test eax, eax
je 0x42cca4
push 0x4ad324
call fcn.00451d60
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x47c
ret