Function at 0x4027e0
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38c
mov eax, dword [0x412860]
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x23c], 0
mov byte [ebp - 0x218], 0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x217]
rep stosd dword es:[edi], eax
mov byte [ebp - 0x110], 0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x10f]
rep stosd dword es:[edi], eax
call dword [sym.imp.SQLUNIRL.dll__GetUnicodeRedirectionLayer_0]
mov dword [0x41301c], eax
push 0
mov eax, dword [0x41301c]
call dword [eax + 0x224]
mov dword [0x4133fc], eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
push eax
push 0x413020
push 0x4133f8
mov ecx, dword [0x4133fc]
push ecx
call fcn.0040bc70
add esp, 0x10
test eax, eax
jne 0x40287c
xor eax, eax
jmp 0x402c5b
mov dword [ebp - 0x388], 0x114
lea edx, [ebp - 0x388]
push edx
call dword [sym.imp.SQLUNIRL.dll__GetVersionEx_4]
mov eax, dword [ebp - 0x378]
mov dword [ebp - 0x38c], eax
cmp dword [ebp - 0x38c], 1
je 0x4028b3
cmp dword [ebp - 0x38c], 2
je 0x4028bf
jmp 0x4028e9
mov dword [0x413024], 0
jmp 0x4028f3
cmp dword [ebp - 0x384], 4
jne 0x4028d4
mov dword [0x413024], 1
jmp 0x4028e7
cmp dword [ebp - 0x384], 5
jne 0x4028e7
mov dword [0x413024], 2
jmp 0x4028f3
mov dword [0x413024], 3
xor ecx, ecx
cmp dword [0x413024], 0
sete cl
mov dword [0x4145cc], ecx
push 0x104
push 0x4143c0
push 1
mov edx, dword [0x4133f8]
push edx
call dword [sym.imp.SQLUNIRL.dll__LoadString_16]
mov dword [0x412900], 0
push 0x105
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x402a04
push str.clusapi.dll
lea ecx, [ebp - 0x218]
push ecx
push 0x4113d8
push 0x104
lea edx, [ebp - 0x110]
push edx
call sub.MSVCR71.dll__snprintf
add esp, 0x14
mov byte [ebp - 0xc], 0
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x26c], eax
cmp dword [ebp - 0x26c], 0
je 0x402a04
mov ecx, dword [ebp - 0x26c]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x26c], 0
push str.resutils.dll
lea edx, [ebp - 0x218]
push edx
push 0x4113f0
push 0x104
lea eax, [ebp - 0x110]
push eax
call sub.MSVCR71.dll__snprintf
add esp, 0x14
mov byte [ebp - 0xc], 0
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
je 0x402a04
mov dword [0x412900], 1
mov edx, dword [ebp - 0x23c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x23c], 0
push 0
push 0x4113f8
mov eax, dword [0x41301c]
call dword [eax + 0x184]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
je 0x402a5e
push 0
push 0x1f4
push 0x111
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
push 0
push 0xf120
push 0x112
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
xor eax, eax
jmp 0x402c5b
push str.SQLMANGR_MUTEX
push 0
push 0
mov eax, dword [0x41301c]
call dword [eax + 0xb0]
mov dword [ebp - 0x270], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x268], eax
cmp dword [ebp - 0x268], 0xb7
jne 0x402ac9
push 0
push 0x1f4
push 0x111
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
push 0
push 0xf120
push 0x112
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
xor eax, eax
jmp 0x402c5b
cmp dword [ebp - 0x268], 0
je 0x402ad9
xor eax, eax
jmp 0x402c5b
cmp dword [ebp + 0xc], 0
jne 0x402b8a
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 0x402c70
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x258], 0x1e
mov eax, dword [0x4133f8]
mov dword [ebp - 0x254], eax
push 0x70
call dword [sym.imp.SQLUNIRL.dll__MAKEINTRESOURCE_4]
push eax
mov ecx, dword [0x4133f8]
push ecx
call dword [sym.imp.SQLUNIRL.dll__LoadIcon_8]
mov dword [ebp - 0x250], eax
push 0x7f00
call dword [sym.imp.SQLUNIRL.dll__MAKEINTRESOURCE_4]
push eax
push 0
call dword [sym.imp.SQLUNIRL.dll__LoadCursor_8]
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x248], 5
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], str.SQLManagerApplicationClass
lea edx, [ebp - 0x264]
push edx
mov eax, dword [0x41301c]
call dword [eax + 0x3bc]
movzx ecx, ax
test ecx, ecx
jne 0x402b8a
xor eax, eax
jmp 0x402c5b
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x413040
call fcn.004096a0
add esp, 4
push 0x413040
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040b030
add esp, 8
push 0x411488
push 0
call fcn.0040c2a0
add esp, 8
mov dword [0x4145c8], eax
push 0
push 0x402c70
push 0
push 0x67
call dword [sym.imp.SQLUNIRL.dll__MAKEINTRESOURCE_4]
push eax
mov eax, dword [0x4133f8]
push eax
call fcn.004022a0
add esp, 0x14
push 0
push 0
push 0
lea ecx, [ebp - 0x234]
push ecx
mov edx, dword [0x41301c]
call dword [edx + 0x21c]
test eax, eax
je 0x402c3b
lea eax, [ebp - 0x234]
push eax
mov ecx, dword [0x4132dc]
push ecx
call dword [sym.imp.SQLUNIRL.dll__IsDialogMessage_8]
test eax, eax
jne 0x402c39
lea edx, [ebp - 0x234]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x234]
push eax
mov ecx, dword [0x41301c]
call dword [ecx + pe_nt_image_headers32]
jmp 0x402be4
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0x4133f8
mov edx, dword [0x4133fc]
push edx
call fcn.0040c1a0
add esp, 8
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 4]
call fcn.0040cd05
pop edi
mov esp, ebp
pop ebp
ret 0x10