Function at 0x685610
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
push esi
mov ecx, dword [ebp + 8]
push edi
push eax
push ecx
mov ecx, ebx
mov dword [ebp - 0x14], ebx
call fcn.00685a70
test eax, eax
je 0x68563f
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.00686240
mov esi, eax
test esi, esi
je 0x6856ec
mov edi, dword [0x7fd5f0]
push 0x7b4240
push 0x7d406c
lea edx, [ebp - 0x114]
push str.SELECT__FROM__s_WHERE__s0_LIMIT_1
push edx
call fcn.0070258b
mov ecx, dword [0x8019f0]
add esp, 0x10
test ecx, ecx
jne 0x6856c4
mov eax, dword [edi]
push ecx
lea ecx, [ebp - 0x114]
push ecx
mov ecx, edi
call dword [eax]
push eax
mov ecx, 0x8019f0
call fcn.0047bd90
mov ecx, dword [0x8019f0]
test ecx, ecx
setne al
test al, al
jne 0x6856c4
push 0x38
push str.....GameBaseCodeMTgamedata.h
push str.CreateNewDefault_pDb_
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x6856ec
mov edx, dword [ecx]
push 0
call dword [edx]
test eax, eax
mov dword [esi + 4], eax
je 0x6856e0
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 0x68571b
push 0x2f
push 0x7d40a8
push str.pData__pData__Create_Database____ID_NONE_
push str.IF_NOT
push 0x793720
call fcn.00401080
mov eax, dword [esi]
add esp, 0x14
mov ecx, esi
call dword [eax]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x685817
mov eax, dword [ebx + 0xc]
xor ecx, ecx
add eax, 8
mov dword [ebp - 0x10], eax
mov edx, dword [eax + 8]
mov ebx, dword [eax + 4]
sub edx, ebx
sar edx, 2
je 0x685758
mov edi, ebx
mov edx, edi
cmp dword [edx], 0
jne 0x685767
mov ebx, dword [eax + 8]
inc ecx
sub ebx, dword [eax + 4]
add edx, 4
sar ebx, 2
cmp ecx, ebx
jb 0x685742
xor edx, edx
mov edi, eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], edi
mov dword [ebp - 4], edx
jmp 0x685781
mov edx, dword [edi + ecx*4]
mov edi, eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], edi
mov dword [ebp - 4], 0
jmp 0x685781
mov edi, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x685814
mov ecx, dword [edx + 8]
test ecx, ecx
mov dword [ebp - 4], ecx
jne 0x6857ba
push 0x42
push str.....commonT_SingleMap.h
push str.m_pObjm_iter__second
push str.ASSERT
push 0x793720
call fcn.00401080
mov edi, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
add esp, 0x14
mov eax, edx
mov edx, dword [edx]
test edx, edx
mov dword [ebp - 0xc], edx
jne 0x6857f3
mov ebx, dword [edi + 8]
mov edx, dword [edi + 4]
mov eax, dword [eax + 4]
sub ebx, edx
sar ebx, 2
xor edx, edx
div ebx
mov eax, dword [edi + 8]
mov ebx, dword [edi + 4]
sub eax, ebx
inc edx
sar eax, 2
cmp edx, eax
jae 0x6857f3
mov eax, ebx
mov eax, dword [eax + edx*4]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x6857d7
mov edx, dword [ecx]
push 3
call dword [edx + 8]
cmp eax, dword [ebp + 0xc]
jne 0x68577b
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebx + 0xc]
call fcn.00687350
jmp 0x685817
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebx + 8]
mov ecx, dword [eax + 0x98]
test ecx, ecx
jne 0x685849
push 0x227
push 0x797d04
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68584e
mov edx, dword [ecx]
call dword [edx + 4]
mov edx, dword [esi]
push eax
push 1
mov ecx, esi
call dword [edx + 0x10]
mov ecx, dword [ebp + 8]
mov eax, dword [esi]
push ecx
push 2
mov ecx, esi
call dword [eax + 0x10]
mov eax, dword [ebp + 0xc]
mov edx, dword [esi]
push eax
push 3
mov ecx, esi
call dword [edx + 0x10]
mov eax, dword [ebp + 0x14]
mov edx, dword [esi]
push 0x100
push eax
push 4
mov ecx, esi
call dword [edx + 0x14]
mov edi, dword [ebp + 0x10]
mov edx, dword [esi]
mov ecx, esi
mov eax, dword [edi]
push eax
push 5
call dword [edx + 0x10]
mov eax, dword [edi + 4]
mov edx, dword [esi]
push eax
push 6
mov ecx, esi
call dword [edx + 0x10]
mov eax, dword [edi + 8]
mov edx, dword [esi]
push eax
push 7
mov ecx, esi
call dword [edx + 0x10]
mov eax, dword [edi + 0xc]
mov edx, dword [esi]
push eax
push 8
mov ecx, esi
call dword [edx + 0x10]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x30]
mov ecx, dword [ebx + 0xc]
push esi
mov eax, dword [ecx]
call dword [eax + 0x10]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x10