Function at 0x402580
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x380
push edi
mov dword [ebp - 0x358], 0
mov dword [ebp - 0x37c], 0
mov byte [ebp - 0x32c], 0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x32b]
rep stosd dword es:[edi], eax
mov byte [ebp - 0x108], 0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x107]
rep stosd dword es:[edi], eax
call dword [sym.imp.SQLUNIRL.dll__GetUnicodeRedirectionLayer_0]
mov dword [0x41109c], eax
push 0
mov eax, dword [0x41109c]
call dword [eax + 0x224]
mov dword [0x41147c], eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
push eax
push 0x4110a0
push 0x411478
mov ecx, dword [0x41147c]
push ecx
call fcn.0040b6c0
add esp, 0x10
test eax, eax
jne 0x402612
xor eax, eax
jmp 0x4029f2
mov dword [ebp - 0x224], 0x114
lea edx, [ebp - 0x224]
push edx
call dword [sym.imp.SQLUNIRL.dll__GetVersionEx_4]
mov eax, dword [ebp - 0x214]
mov dword [ebp - 0x380], eax
cmp dword [ebp - 0x380], 1
je 0x402649
cmp dword [ebp - 0x380], 2
je 0x402655
jmp 0x40267f
mov dword [0x4110a4], 0
jmp 0x402689
cmp dword [ebp - 0x220], 4
jne 0x40266a
mov dword [0x4110a4], 1
jmp 0x40267d
cmp dword [ebp - 0x220], 5
jne 0x40267d
mov dword [0x4110a4], 2
jmp 0x402689
mov dword [0x4110a4], 3
xor ecx, ecx
cmp dword [0x4110a4], 0
sete cl
mov dword [0x41264c], ecx
push 0x104
push 0x412440
push 1
mov edx, dword [0x411478]
push edx
call dword [sym.imp.SQLUNIRL.dll__LoadString_16]
mov dword [0x410980], 0
push 0x105
lea eax, [ebp - 0x32c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x40279a
push str.clusapi.dll
lea ecx, [ebp - 0x32c]
push ecx
push 0x40f478
push 0x104
lea edx, [ebp - 0x108]
push edx
call sub.MSVCRT.dll__snprintf
add esp, 0x14
mov byte [ebp - 4], 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x358], eax
cmp dword [ebp - 0x358], 0
je 0x40279a
mov ecx, dword [ebp - 0x358]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x358], 0
push str.resutils.dll
lea edx, [ebp - 0x32c]
push edx
push 0x40f490
push 0x104
lea eax, [ebp - 0x108]
push eax
call sub.MSVCRT.dll__snprintf
add esp, 0x14
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x37c], eax
cmp dword [ebp - 0x37c], 0
je 0x40279a
mov dword [0x410980], 1
mov edx, dword [ebp - 0x37c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x37c], 0
push 0
push 0x40f498
mov eax, dword [0x41109c]
call dword [eax + 0x184]
mov dword [ebp - 0x35c], eax
cmp dword [ebp - 0x35c], 0
je 0x4027f4
push 0
push 0x1f4
push 0x111
mov ecx, dword [ebp - 0x35c]
push ecx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
push 0
push 0xf120
push 0x112
mov edx, dword [ebp - 0x35c]
push edx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
xor eax, eax
jmp 0x4029f2
push str.SQLMANGR_MUTEX
push 0
push 0
mov eax, dword [0x41109c]
call dword [eax + 0xb0]
mov dword [ebp - 0x110], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0xb7
jne 0x40285f
push 0
push 0x1f4
push 0x111
mov ecx, dword [ebp - 0x35c]
push ecx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
push 0
push 0xf120
push 0x112
mov edx, dword [ebp - 0x35c]
push edx
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
xor eax, eax
jmp 0x4029f2
cmp dword [ebp - 0x10c], 0
je 0x40286f
xor eax, eax
jmp 0x4029f2
cmp dword [ebp + 0xc], 0
jne 0x402922
mov dword [ebp - 0x354], 0
mov dword [ebp - 0x350], 0x4029f9
mov dword [ebp - 0x34c], 0
mov dword [ebp - 0x348], 0x1e
mov eax, dword [0x411478]
mov dword [ebp - 0x344], eax
push 0x70
call dword [sym.imp.SQLUNIRL.dll__MAKEINTRESOURCE_4]
push eax
mov ecx, dword [0x411478]
push ecx
call dword [sym.imp.SQLUNIRL.dll__LoadIcon_8]
mov dword [ebp - 0x340], 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 - 0x33c], eax
mov dword [ebp - 0x338], 5
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], str.SQLManagerApplicationClass
lea edx, [ebp - 0x354]
push edx
mov eax, dword [0x41109c]
call dword [eax + 0x3bc]
and eax, 0xffff
test eax, eax
jne 0x402922
xor eax, eax
jmp 0x4029f2
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x4110c0
call fcn.00409240
add esp, 4
push 0x4110c0
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0040ab30
add esp, 8
push 0x40f528
push 0
call fcn.0040bc6b
add esp, 8
mov dword [0x412648], eax
push 0
push 0x4029f9
push 0
push 0x67
call dword [sym.imp.SQLUNIRL.dll__MAKEINTRESOURCE_4]
push eax
mov edx, dword [0x411478]
push edx
call fcn.004020a3
add esp, 0x14
push 0
push 0
push 0
lea eax, [ebp - 0x378]
push eax
mov ecx, dword [0x41109c]
call dword [ecx + 0x21c]
test eax, eax
je 0x4029d2
lea edx, [ebp - 0x378]
push edx
mov eax, dword [0x41135c]
push eax
call dword [sym.imp.SQLUNIRL.dll__IsDialogMessage_8]
test eax, eax
jne 0x4029d0
lea ecx, [ebp - 0x378]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [ebp - 0x378]
push edx
mov eax, dword [0x41109c]
call dword [eax + 0xf0]
jmp 0x40297d
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0x411478
mov ecx, dword [0x41147c]
push ecx
call fcn.0040bb93
add esp, 8
mov eax, dword [ebp - 0x370]
pop edi
mov esp, ebp
pop ebp
ret 0x10