Function at 0x409f89
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1bc
mov eax, dword [0x418004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
and dword [ebp - 0x18c], 0
push ebx
push esi
push edi
mov dword [ebp - 0x14c], eax
xor ebx, ebx
mov eax, dword [ebp + 0xc]
mov esi, ecx
push 0x38
mov dword [ebp - 0x184], eax
xor edi, edi
lea eax, [ebp - 0x148]
mov dword [ebp - 0x150], edx
push ebx
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x154], ebx
add esp, 0xc
test esi, esi
je 0x40a65f
cmp dword [ebp - 0x150], ebx
je 0x40a65f
mov eax, dword [ebp - 0x14c]
test eax, eax
je 0x40a65f
mov ecx, dword [ebp - 0x184]
test ecx, ecx
je 0x40a014
mov eax, ecx
mov dword [ebp - 0x180], ecx
jmp 0x40a02a
push 0
push 0
push 0x110a
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp - 0x180], eax
test eax, eax
je 0x40a65f
push 0x42
push 0
push 0x41c9a8
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x150]
xor ecx, ecx
mov dword [0x41c9ac], eax
inc ecx
mov eax, dword [0x41c93c]
add esp, 0xc
mov dword [0x41c9a8], 0x42
mov dword [0x41c9bc], 0x100
mov word [0x41c9c8], cx
test eax, eax
je 0x40a07f
xor edx, edx
mov dword [ebp - 0x17c], edx
jmp 0x40a0c9
push 0x41c9a8
call dword [sym.imp.COMDLG32.dll_PrintDlgA]
test eax, eax
je 0x40a65a
mov eax, dword [0x41c9b8]
test eax, eax
je 0x40a65a
lea ecx, [ebp - 0x148]
mov dword [ebp - 0x17c], eax
push ecx
push eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
test eax, eax
je 0x40a5fa
mov edx, dword [ebp - 0x17c]
xor ecx, ecx
mov eax, dword [0x41c93c]
inc ecx
test eax, eax
je 0x40a0ef
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 0x170], ecx
mov dword [ebp - 0x164], 0x50
mov dword [ebp - 0x160], 0x42
jmp 0x40a140
mov eax, dword [ebp - 0x138]
add eax, dword [ebp - 0x148]
push 8
mov dword [ebp - 0x16c], eax
mov eax, dword [ebp - 0x134]
push edx
mov dword [ebp - 0x170], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
xor edx, edx
div dword [ebp - 0x170]
push 0xa
push dword [ebp - 0x17c]
mov dword [ebp - 0x164], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
xor edx, edx
div dword [ebp - 0x16c]
mov dword [ebp - 0x160], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ecx, eax
mov dword [ebp - 0x154], ecx
test ecx, ecx
je 0x40a5fa
mov eax, dword [ebp - 0x164]
inc eax
push eax
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x188], ebx
test ebx, ebx
je 0x40a5fa
push 0
push dword [ebp - 0x150]
mov byte [ebx], 0
call dword [sym.imp.USER32.dll_EnableWindow]
and dword [0x41c948], edi
push 0
push 0x409eb0
push dword [ebp - 0x150]
push 0x3e9
push esi
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x41c940], eax
test eax, eax
je 0x40a5e6
mov eax, dword [ebp - 0x180]
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp - 0x164]
mov dword [ebp - 0x1a4], eax
lea eax, [ebp - 0x1b8]
push eax
mov eax, dword [ebp - 0x14c]
push 0
push 0x110c
push eax
mov dword [ebp - 0x1b8], 0x41
mov dword [ebp - 0x1a8], ebx
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40a261
push ebx
push dword [0x41c940]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0x409f20
push dword [0x41c9b8]
call dword [sym.imp.GDI32.dll_SetAbortProc]
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40a21e
sub esi, ecx
lea ebx, [esi + 1]
push ebx
push 1
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40a5e6
push dword [ebp - 0x188]
push ebx
push edi
call dword [sym.imp.msvcrt.dll_strcpy_s]
mov ebx, dword [ebp - 0x188]
add esp, 0xc
xor eax, eax
mov byte [esi + edi], al
jmp 0x40a2b0
mov esi, 0x401368
push esi
push dword [0x41c940]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0x409f20
push dword [0x41c9b8]
call dword [sym.imp.GDI32.dll_SetAbortProc]
push 8
push 1
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40a5e6
push esi
push 8
push edi
call dword [sym.imp.msvcrt.dll_strcpy_s]
add esp, 0xc
xor eax, eax
mov byte [edi + 7], al
cmp dword [0x41c93c], 0
mov dword [0x41c994], 0x14
mov dword [0x41c998], edi
mov dword [0x41c99c], eax
mov dword [0x41c9a0], eax
mov dword [0x41c9a4], eax
je 0x40a34a
mov edx, 0x41c520
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a2e2
sub ecx, esi
jne 0x40a32b
lea eax, [ebp - 0x110]
push eax
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
js 0x40a326
push 0x401370
lea eax, [ebp - 0x110]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_strcat_s]
add esp, 0xc
lea edx, [ebp - 0x110]
jmp 0x40a32b
mov edx, 0x40137c
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x41c944], eax
jmp 0x40a363
push 0x41c994
push dword [0x41c9b8]
call dword [sym.imp.GDI32.dll_StartDocA]
test eax, eax
js 0x40a5e6
and dword [ebp - 0x18c], 0
xor eax, eax
and dword [ebp - 0x190], 0
cmp ax, word [0x41c9c8]
jae 0x40a5b9
mov eax, dword [ebp - 0x180]
and dword [ebp - 0x15c], 0
mov esi, dword [ebp - 0x14c]
mov dword [ebp - 0x158], 1
cmp dword [0x41c93c], 0
mov dword [ebp - 0x174], eax
jne 0x40a3ea
cmp dword [ebp - 0x158], 0
je 0x40a3ea
cmp dword [0x41c948], 0
jne 0x40a5da
push dword [ebp - 0x17c]
call dword [sym.imp.GDI32.dll_StartPage]
test eax, eax
js 0x40a5c3
and dword [ebp - 0x158], 0
and dword [ebp - 0x168], 0
mov eax, dword [ebp - 0x174]
and dword [ebp - 0x194], 0
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp - 0x164]
mov dword [ebp - 0x1a4], eax
lea eax, [ebp - 0x1b8]
push eax
push 0
push 0x110c
push esi
mov dword [ebp - 0x1b8], 0x45
mov dword [ebp - 0x1a8], ebx
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40a4eb
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40a435
sub esi, ecx
je 0x40a4e5
mov eax, dword [ebp - 0x15c]
imul eax, dword [ebp - 0x170]
mov edx, dword [ebp - 0x168]
imul edx, dword [ebp - 0x16c]
imul ecx, eax, 3
lea eax, [ebp - 0x17c]
push eax
push esi
push ebx
call fcn.0040a6ed
test eax, eax
js 0x40a5c3
lea ecx, [ebp - 0x17c]
call fcn.0040a7d1
test eax, eax
js 0x40a5c3
mov esi, dword [ebp - 0x194]
test esi, esi
je 0x40a4e5
cmp dword [esi], 0
je 0x40a4e5
add dword [ebp - 0x15c], 2
lea eax, [ebp - 0x17c]
cmp dword [esi + 4], 0
push eax
je 0x40a4c4
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
mov esi, dword [esi]
mov ecx, esi
call dword [0x41d284]
call esi
jmp 0x40a4d6
push dword [esi + 0xc]
push dword [esi + 8]
mov esi, dword [esi]
mov ecx, esi
call dword [0x41d284]
call esi
test eax, eax
js 0x40a5c3
sub dword [ebp - 0x15c], 2
mov esi, dword [ebp - 0x14c]
cmp dword [ebp - 0x198], 0
je 0x40a517
push dword [ebp - 0x174]
push 4
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40a517
inc dword [ebp - 0x15c]
jmp 0x40a39d
mov eax, dword [ebp - 0x184]
cmp dword [ebp - 0x174], eax
je 0x40a571
push dword [ebp - 0x174]
jmp 0x40a55a
push dword [ebp - 0x174]
push 3
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40a571
cmp eax, dword [ebp - 0x184]
je 0x40a571
dec dword [ebp - 0x15c]
mov dword [ebp - 0x174], eax
push eax
push 1
push 0x110a
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40a52d
jmp 0x40a39d
cmp dword [0x41c93c], 0
jne 0x40a59d
cmp dword [ebp - 0x158], 0
jne 0x40a59d
push dword [ebp - 0x17c]
call dword [sym.imp.GDI32.dll_EndPage]
test eax, eax
js 0x40a59d
mov dword [ebp - 0x158], 1
mov ecx, dword [ebp - 0x190]
movzx eax, word [0x41c9c8]
inc ecx
mov dword [ebp - 0x190], ecx
cmp ecx, eax
jb 0x40a380
mov dword [ebp - 0x18c], 1
cmp dword [0x41c93c], 0
je 0x40a5da
push dword [0x41c944]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a5e6
push dword [0x41c9b8]
call dword [sym.imp.GDI32.dll_EndDoc]
push 1
push dword [ebp - 0x150]
call dword [sym.imp.USER32.dll_EnableWindow]
mov ebx, dword [ebp - 0x188]
mov eax, dword [0x41c940]
test eax, eax
je 0x40a611
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
and dword [0x41c940], 0
mov esi, dword [ebp - 0x154]
test edi, edi
je 0x40a62c
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [0x41c998], 0
test ebx, ebx
je 0x40a63a
push ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [0x41c9b8]
test ecx, ecx
je 0x40a652
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
and dword [0x41c9b8], 0
mov eax, dword [ebp - 0x18c]
jmp 0x40a661
xor eax, eax
inc eax
jmp 0x40a661
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417690
leave
ret 8