Function at 0x406100
Capabilities:
Extract resource via kernel32 functions
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41710e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1188
call fcn.00416290
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov eax, dword [esi + 0xe0]
cmp eax, 1
jge 0x40614b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
push 0x4260a8
call fcn.00415ecc
call sub.MFC42u.DLL_AfxGetModuleState
mov edi, dword [eax + 0xc]
call sub.MFC42u.DLL_AfxGetModuleState
mov ebx, dword [eax + 0xc]
push 0x421b04
push 0x6c
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4061a2
push str.Couldnt_load_usage_instructions__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + eax + 2]
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x4061e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push ebx
push eax
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x40621b
mov eax, dword [ebp - 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x80]
call sub.MFC42u.DLL_CDatabase::CDatabase
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
cmp ebx, dword [esi + 0xe0]
jge 0x40643e
lea ecx, [ebp - 0x18]
push 3
push ecx
mov ecx, dword [esi + 0xdc]
lea edi, [ebx*4]
add ecx, edi
call sub.MFC42u.DLL_CString::Mid_1
mov edx, dword [eax]
mov eax, dword [esi + 0xd4]
push edx
lea edx, [ebp - 0x1198]
mov ecx, dword [eax + 0x128]
push ecx
push str.DSNSQLUpgrade_UIDsa_PWD_s_DATABASE_s
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::CString
mov edx, dword [esi + 0xd4]
push 0
push 0
lea eax, [ebp - 0x598]
push 0x400
push eax
mov eax, dword [edx + 0xf8]
lea ecx, [ebp - 0x1198]
push 0xffffffffffffffff
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x4062cf
lea ecx, [ebp - 0x1198]
push 0x400
push ecx
lea edx, [ebp - 0x598]
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x1198]
push 0
push eax
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_CDatabase::OpenEx
test eax, eax
je 0x4063f2
mov ecx, dword [esi + 0xd4]
mov eax, dword [ebp - 0x7c]
mov edx, dword [ecx + 0xf8]
push edx
push 0x91a7
push eax
call sub.ODBC32.dll_SQLSetConnectOption
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x198]
call fcn.004055b0
mov edx, dword [ebp - 0x14]
push 0
push edx
push 0xffffffffffffffff
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 2
call sub.MFC42u.DLL_CRecordset::Open
test eax, eax
je 0x4063cc
mov eax, dword [ebp - 0xd0]
test eax, eax
jne 0x406385
mov ecx, dword [esi + 0xdc]
lea eax, [ebp - 0x1c]
push 3
push eax
add ecx, edi
call sub.MFC42u.DLL_CString::Mid_1
mov ecx, dword [eax]
lea edx, [ebp - 0x998]
push ecx
push str._r_n_s_r_n_r_n
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x1c]
call sub.MFC42u.DLL_CString::CString
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x998]
push eax
mov ecx, edi
call sub.MFC42u.DLL_CString::operator_1
jmp 0x406388
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0xd0]
test eax, eax
jne 0x4063c1
lea ecx, [ebp - 0x88]
push ecx
mov ecx, edi
call sub.MFC42u.DLL_CString::operator
push 0x4219cc
mov ecx, edi
call sub.MFC42u.DLL_CString::operator_1
mov edx, dword [ebp - 0x198]
push 1
push 1
lea ecx, [ebp - 0x198]
call dword [edx + 0x1c]
jmp 0x406388
lea ecx, [ebp - 0x198]
call sub.MFC42u.DLL_CRecordset::Close
lea ecx, [ebp - 0x80]
call sub.MFC42u.DLL_CDatabase::Close
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 1
call fcn.00415e4e
mov dword [ebp - 4], 0
inc ebx
jmp 0x40622b
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ecx]
xor ecx, ecx
mov eax, dword [edx - 8]
test eax, eax
setg cl
mov esi, ecx
lea ecx, [ebp - 0x80]
call fcn.00415ea2
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4