Function at 0x40a630
Capabilities:
Get common file path

Disassembly:
sub esp, 0x18c
mov dl, byte [0x421d68]
push ebx
push ebp
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], dl
mov byte [esp + 0x138], dl
rep stosd dword es:[edi], eax
mov ecx, 0x18
lea edi, [esp + 0x139]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
push 0
stosb byte es:[edi], al
mov eax, dword [0x548160]
push 0x147
push 0x3f0
push eax
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov ebp, eax
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x30]
push ecx
push 0x64
stosb byte es:[edi], al
call esi
xor bl, bl
jmp 0x40a6ac
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test bl, bl
je 0x40a893
cmp bl, 1
jne 0x40a700
lea edx, [ebp + ebp*2]
or ecx, 0xffffffff
shl edx, 5
add edx, ebp
xor eax, eax
lea edi, [edx*4 + 0x417868]
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.WINNT4.0
jmp 0x40a86e
cmp bl, 2
jne 0x40a755
lea eax, [esp + 0x30]
push eax
push 0x64
call esi
lea ecx, [ebp + ebp*2]
xor eax, eax
shl ecx, 5
add ecx, ebp
lea edx, [esp + 0x30]
lea edi, [ecx*4 + 0x417868]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.WINDOWS
jmp 0x40a86e
cmp bl, 3
jne 0x40a81e
cmp byte [0x54815c], 1
jne 0x40a77e
mov eax, dword [esp + 0x1a0]
lea ecx, [esp + 0x138]
push eax
push 0x41a03c
push ecx
jmp 0x40a793
mov edx, dword [esp + 0x1a0]
lea eax, [esp + 0x138]
push edx
push str.Be_pressed_for_card_driver_file:_s.sys_at_current_directory._r_nmanually_appoint_directory_
push eax
call fcn.0040cce6
mov edx, dword [0x548160]
add esp, 0xc
lea ecx, [esp + 0x138]
push 0x34
push str.Driver_inatall
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
je 0x40a8b7
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x14]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov eax, dword [0x548160]
xor esi, esi
lea ecx, [esp + 0x30]
push edx
mov byte [esp + 0x34], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], str.Select_Directory
mov dword [esp + 0x24], 0x51
mov dword [esp + 0x28], esi
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
cmp eax, esi
je 0x40a8b7
lea ecx, [esp + 0x30]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
jmp 0x40a893
cmp bl, 4
jne 0x40a893
lea edx, [esp + 0x30]
push edx
push 0x64
call esi
lea eax, [ebp + ebp*2]
or ecx, 0xffffffff
shl eax, 5
add eax, ebp
lea edx, [esp + 0x30]
lea edi, [eax*4 + 0x417868]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.WIN_98NT40
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x1a0]
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.0040a500
add esp, 8
cmp al, 3
je 0x40a8c4
inc bl
cmp bl, 5
jl 0x40a6a6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18c
ret
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, 1
mov edx, ecx
mov esi, edi
mov edi, 0x54e428
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, 0x18c
ret