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

Disassembly:
push ebp
sub esp, 0x81c
lea ebp, [esp - 4]
mov eax, dword [0x496ee4]
xor eax, ebp
mov dword [ebp + 0x81c], eax
push 0x2c
mov eax, 0x47e13f
call fcn.0047bc99
mov eax, dword [ebp + 0x828]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x82c]
mov dword [ebp - 0x18], eax
lea eax, [ebp]
xor esi, esi
push eax
mov dword [ebp - 0x14], esi
call fcn.004130a9
pop ecx
mov dword [ebp - 4], esi
cmp dword [ebp + 0x14], esi
jbe 0x413435
xor eax, eax
push 0x7fe
mov word [ebp + 0x1c], ax
lea eax, [ebp + 0x1e]
push esi
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [ebp + 0x1c]
push eax
push 0x7ff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x413372
lea eax, [ebp + 4]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push eax
call edi
push str._sqlite3.dll
lea eax, [ebp]
push eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___wchar_t_const__]
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x41339c
mov eax, dword [eax + 4]
jmp 0x41339f
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea ecx, [ebp - 0x38]
mov ebx, eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp ebx, esi
je 0x41342f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.sqlite3_open
push ebx
call esi
push str.sqlite3_close
push ebx
mov dword [0x496fbc], eax
call esi
push str.sqlite3_exec
push ebx
mov dword [0x496fc0], eax
call esi
push str.sqlite3_free
push ebx
mov dword [0x496fb8], eax
call esi
mov ecx, dword [0x496fbc]
xor esi, esi
mov dword [0x496fb4], eax
cmp ecx, esi
je 0x413428
cmp dword [0x496fc0], esi
je 0x413428
cmp dword [0x496fb8], esi
je 0x413428
cmp eax, esi
je 0x413428
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x1c]
call ecx
pop ecx
pop ecx
cmp eax, esi
je 0x413468
push dword [ebp - 0x10]
call dword [0x496fc0]
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp + 0x1c]
push eax
call edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x81c]
xor ecx, ebp
call fcn.0047bc8a
add ebp, 0x820
leave
ret
lea eax, [ebp - 0x14]
push eax
push esi
push 0x413033
push dword [ebp - 0x18]
push dword [ebp - 0x10]
call dword [0x496fb8]
add esp, 0x14
cmp eax, esi
je 0x4134b7
push dword [ebp - 0x14]
push str.SQL_error:__s_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
push dword [ebp - 0x14]
call dword [0x496fb4]
push dword [ebp - 0x10]
call dword [0x496fc0]
add esp, 0x14
jmp 0x413428
push dword [ebp - 0x10]
call dword [0x496fc0]
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp + 0x1c]
push eax
call edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor eax, eax
jmp 0x413445