Function at 0x40142f
Capabilities:
Get common file path
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
push ebx
lea eax, [ebp - 0x450]
push esi
push edi
xor esi, esi
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov eax, dword [str.odbccp32.dll]
lea ecx, [ebp - 0x450]
push eax
lea edx, [ebp - 0x348]
push ecx
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x348]
push esi
push 0x10000080
push 3
push esi
push 3
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
je 0x401514
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0xffffffff
je 0x401514
cmp ebx, 0x4e20
jae 0x401514
lea eax, [ebp - 8]
lea ecx, [ebp - 0xc]
push eax
lea edx, [ebp - 4]
push ecx
push edx
call fcn.00401702
add esp, 0xc
mov edi, eax
lea ecx, [ebp - 0x10]
lea eax, [ebp - 0x348]
push ecx
push eax
call dword [ebp - 4]
test eax, eax
jne 0x40150d
lea eax, [ebp - 0x450]
lea ecx, [ebp - 0x13c]
push eax
push str._sodbccp32.bad
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x13c]
lea edx, [ebp - 0x348]
push 3
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [str.odbccp32.dll]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
lea eax, [ebp - 0x348]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x4016c6
test edi, edi
je 0x4016c6
cmp ebx, edi
je 0x4016b9
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x20]
push eax
lea edx, [ebp - 0x24]
push ecx
push edx
call fcn.00401702
add esp, 0xc
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x401572
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, edi
jmp 0x4016ca
push 0x20a
lea eax, [ebp - 0x65c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x34]
lea eax, [ebp - 0x348]
push ecx
push eax
call dword [ebp - 0x24]
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x65c]
push ecx
mov dword [ebp - 0x14], eax
push edx
call dword [ebp - 0x24]
cmp dword [ebp - 0x14], 0
mov dword [ebp - 0x3c], eax
je 0x4016ab
test eax, eax
je 0x4016ab
push dword [ebp - 0x14]
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp - 0x3c]
push 0
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp - 8]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalLock]
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_LocalLock]
cmp dword [ebp - 0x10], 0
mov dword [ebp - 0xc], eax
je 0x401670
test eax, eax
je 0x401670
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0
lea edx, [ebp - 0x65c]
push edx
call dword [ebp - 0x20]
test eax, eax
je 0x401670
push dword [ebp - 0xc]
push dword [ebp - 0x3c]
push 0
lea edx, [ebp - 0x348]
push edx
call dword [ebp - 0x20]
test eax, eax
je 0x401670
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x28]
push eax
push ecx
push 0x403118
push dword [ebp - 0x10]
call dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x2c]
push ecx
push edx
push 0x403118
push dword [ebp - 0xc]
call dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
call fcn.004016d1
movsx eax, al
add esp, 8
cmp eax, 0x3c
je 0x40166b
cmp eax, 0x3d
jl 0x401679
cmp eax, 0x3e
jle 0x401670
jmp 0x401679
mov esi, ebx
push edi
jmp 0x401673
mov esi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 8], 0
je 0x401691
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x4016b4
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4016b4
mov esi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 0x18]
jmp 0x4016bc
mov esi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x4016ca
mov eax, ebx
or eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret