Function at 0x640320
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
test eax, eax
mov edi, ecx
je 0x640540
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x640540
mov ecx, dword [edi + 0x98]
push 4
mov eax, dword [ecx]
call dword [eax + 8]
cmp eax, 0x2f
je 0x64036c
mov ecx, dword [edi + 0x98]
push 4
mov edx, dword [ecx]
call dword [edx + 8]
cmp eax, 0x30
jne 0x640561
mov ecx, dword [edi + 0x4c]
xor ebx, ebx
mov eax, dword [ecx]
call dword [eax + 4]
test eax, eax
jle 0x6403b6
mov ecx, dword [edi + 0x4c]
push ebx
mov edx, dword [ecx]
call dword [edx + 8]
mov esi, eax
test esi, esi
je 0x6403a9
mov eax, dword [esi]
push 2
mov ecx, esi
call dword [eax + 8]
cmp eax, dword [ebp + 8]
jne 0x6403a9
mov edx, dword [esi]
push 3
mov ecx, esi
call dword [edx + 8]
cmp eax, 1
je 0x64047b
mov ecx, dword [edi + 0x4c]
inc ebx
mov eax, dword [ecx]
call dword [eax + 4]
cmp ebx, eax
jl 0x64037a
mov eax, dword [ebp + 0x10]
test eax, eax
jl 0x640561
jg 0x6403ce
mov eax, dword [ebp + 0xc]
test eax, eax
jb 0x640561
call fcn.00642d30
mov esi, eax
test esi, esi
je 0x6404d1
mov ebx, dword [0x7fd5f0]
push 0x7b4240
push 0x7c9204
lea ecx, [ebp - 0x100]
push str.SELECT__FROM__s_WHERE__s0_LIMIT_1
push ecx
call fcn.0070258b
mov ecx, dword [0x801a08]
add esp, 0x10
test ecx, ecx
jne 0x6404a9
mov edx, dword [ebx]
lea eax, [ebp - 0x100]
push ecx
push eax
mov ecx, ebx
call dword [edx]
mov ebx, eax
mov eax, dword [0x801a08]
test eax, eax
jne 0x64042c
test ebx, ebx
jne 0x64044a
push 0x1a
push str.....common_autoptr.h
push str._m_ptr__ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
test ebx, ebx
setne al
mov ecx, ebx
test al, al
mov dword [0x801a08], ecx
jne 0x6404a9
push 0x38
push str.....GameBaseCodeMTGameData.h
push str.CreateNewDefault_pDb_
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x6404d1
mov edx, dword [esi]
push 5
mov ecx, esi
call dword [edx + 0x18]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
add eax, edi
mov edi, dword [esi]
adc edx, ecx
mov ecx, esi
push edx
push eax
push 5
call dword [edi + 0x1c]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x2c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ecx]
push 0
call dword [edx]
test eax, eax
mov dword [esi + 4], eax
je 0x6404c5
mov edx, dword [eax]
push 0x7b4240
mov ecx, eax
call dword [edx + 0x30]
mov dword [esi + 8], eax
mov edx, dword [esi + 4]
test edx, edx
setne al
test al, al
jne 0x6404e7
push 0xad7
push 0x7c93d4
push str.pData__pData__Create_Database____ID_NONE_
push str.IF_OK
jmp 0x640554
mov ecx, dword [edi + 0x98]
mov ebx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 4]
push eax
push 1
mov ecx, esi
call dword [ebx + 0x10]
mov eax, dword [ebp + 8]
mov edx, dword [esi]
push eax
push 2
mov ecx, esi
call dword [edx + 0x10]
mov edx, dword [esi]
push 1
push 3
mov ecx, esi
call dword [edx + 0x10]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [esi]
push ecx
push edx
push 5
mov ecx, esi
call dword [eax + 0x1c]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
mov edi, dword [edi + 0x4c]
push esi
mov ecx, edi
mov edx, dword [edi]
call dword [edx + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0xac0
push 0x7c93d4
push str.idUser__m_setIncome
push str.CHECK
push 0x793720
call fcn.00401080
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc