Function at 0x68d070
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x74ce8c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84c
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 8]
mov dword [ebp - 0x10], esp
test eax, eax
mov dword [ebp - 0x18], ebx
je 0x68d0be
push 0x3f
push 0x7d4790
push str._m_pData
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
push 0xc
call fcn.00728cf3
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
mov dword [ebp - 4], 0
je 0x68d0df
mov ecx, eax
call fcn.006911e0
jmp 0x68d0e1
xor eax, eax
test eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebx + 8], eax
jne 0x68d122
push 0x42
push 0x7d4790
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor al, al
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]
mov edx, dword [eax]
push ecx
mov ecx, eax
call dword [edx + 0x24]
test al, al
jne 0x68d164
push 0x44
push 0x7d4790
push str.m_pData__Create_pRes_
push str.IF_NOT
push 0x793720
call fcn.00401080
add esp, 0x14
xor al, al
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 [ebx + 8]
test ecx, ecx
jne 0x68d18d
push 0x4a
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d192
mov edx, dword [ecx]
call dword [edx + 4]
push eax
push 0x7d4944
lea eax, [ebp - 0x42c]
push str.SELECT__FROM__s_WHERE_castle_id_u
push eax
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x10
lea eax, [ebp - 0x42c]
mov edx, dword [ecx]
push 1
push eax
call dword [edx]
mov edi, eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x2c], edi
test edi, edi
mov dword [ebp - 4], 1
je 0x68d28b
push 4
call fcn.00728cf3
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x68d1f4
mov ecx, eax
call fcn.006c16e0
jmp 0x68d1f6
xor eax, eax
test eax, eax
mov byte [ebp - 4], 1
mov dword [ebx], eax
je 0x68d20c
push edi
mov ecx, eax
call fcn.006c1710
test al, al
jne 0x68d28b
mov ecx, dword [ebx + 8]
mov edx, dword [ecx]
call dword [edx + 4]
push eax
push str.Load_buiding_failed.castle_id__u_
call fcn.00401080
mov ecx, dword [ebx + 8]
add esp, 8
test ecx, ecx
je 0x68d264
mov eax, dword [ecx]
mov byte [ebp - 4], 3
call dword [eax]
jmp 0x68d25d
mov dword [ebx + 8], 0
test edi, edi
mov dword [ebp - 4], 0xffffffff
je 0x68d276
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
xor al, al
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 [ebx + 8]
test ecx, ecx
jne 0x68d2b4
push 0x4a
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d2b9
mov eax, dword [ecx]
call dword [eax + 4]
push eax
push 0x7d48ec
lea ecx, [ebp - 0x42c]
push str.SELECT__FROM__s_WHERE_map_id_u_LIMIT_200
push ecx
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x10
lea eax, [ebp - 0x42c]
mov edx, dword [ecx]
push 1
push eax
call dword [edx]
mov esi, eax
mov dword [ebp + 8], esi
mov dword [ebp - 0x18], esi
test esi, esi
mov byte [ebp - 4], 5
je 0x68d389
xor edi, edi
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x60]
cmp edi, eax
jae 0x68d386
push 4
call fcn.00728cf3
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
mov byte [ebp - 4], 6
je 0x68d327
mov ecx, eax
call fcn.006c4350
mov esi, eax
jmp 0x68d329
xor esi, esi
test esi, esi
mov byte [ebp - 4], 5
je 0x68d340
mov eax, dword [ebp + 8]
mov ecx, esi
push eax
call fcn.006c4380
test al, al
jne 0x68d36c
push 0x5e
push 0x7d4790
push str.pItem__pItem__CreateByRes_pResItem_
push str.IF_OK
push 0x793720
call fcn.00401080
mov ecx, dword [ebp + 8]
add esp, 0x14
inc edi
mov eax, dword [ecx]
call dword [eax + 0x64]
mov esi, dword [ebp + 8]
jmp 0x68d2fc
mov ecx, dword [ebx + 4]
push esi
mov edx, dword [ecx]
call dword [edx + 0xc]
mov ecx, dword [ebp + 8]
inc edi
mov eax, dword [ecx]
call dword [eax + 0x64]
mov esi, dword [ebp + 8]
jmp 0x68d2fc
mov edi, dword [ebp - 0x14]
mov ecx, ebx
call fcn.00690660
test al, al
jne 0x68d3ca
test esi, esi
mov byte [ebp - 4], 1
je 0x68d3a3
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
test edi, edi
mov dword [ebp - 4], 0xffffffff
je 0x68d3b5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
xor al, al
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 [ebx + 8]
test ecx, ecx
jne 0x68d3f4
push 0x5f
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x68d4f7
mov edx, dword [ecx]
push 3
call dword [edx + 8]
test eax, eax
sete al
test al, al
je 0x68d4f7
mov ecx, dword [ebx + 8]
test ecx, ecx
jne 0x68d431
push 0x4b
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d438
mov eax, dword [ecx]
push 4
call dword [eax + 8]
mov ecx, dword [0x7fd5e4]
push eax
mov edx, dword [ecx]
call dword [edx + 0x54]
mov esi, eax
test esi, esi
je 0x68d4f1
mov ecx, ebx
call fcn.00690ec0
lea ecx, [ebp - 0x858]
mov byte [esi + 0x8f4], al
call fcn.005950c0
mov ecx, dword [ebx + 8]
mov byte [ebp - 4], 7
test ecx, ecx
jne 0x68d493
push 0x44
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d49a
mov eax, dword [ecx]
push 7
call dword [eax + 8]
push eax
push 0xe5
lea ecx, [ebp - 0x858]
call fcn.00595300
test eax, eax
jne 0x68d4cf
push 0x71
push 0x7d4790
push str.msg.CreateHead_NAMEACT_MAIN_CASTLE_LEV__this__GetInt_CASTLEDATA_Level__
push str.IF_OK
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x68d4e2
mov edx, dword [esi + 8]
lea ecx, [esi + 8]
lea eax, [ebp - 0x858]
push eax
call dword [edx + 0x1b0]
lea ecx, [ebp - 0x858]
mov byte [ebp - 4], 5
call fcn.00595170
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x24]
push ecx
mov ecx, ebx
call fcn.0068ffc0
mov ecx, dword [ebx + 8]
test ecx, ecx
jne 0x68d52b
push 0x44
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d532
mov edx, dword [ecx]
push 0xf
call dword [edx + 8]
mov ecx, dword [ebp - 0x1c]
cmp eax, ecx
jge 0x68d545
push 1
push ecx
push 0xf
mov ecx, ebx
call fcn.0068e010
mov ecx, dword [ebx + 8]
test ecx, ecx
jne 0x68d56e
push 0x44
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d575
mov eax, dword [ecx]
push 0x10
call dword [eax + 8]
mov ecx, dword [ebp - 0x24]
cmp eax, ecx
jge 0x68d588
push 1
push ecx
push 0x10
mov ecx, ebx
call fcn.0068e010
mov ecx, dword [ebx + 8]
test ecx, ecx
jne 0x68d5b1
push 0x44
push 0x7ae1cc
push str.m_pData
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor eax, eax
jmp 0x68d5b8
mov edx, dword [ecx]
push 0x11
call dword [edx + 8]
mov ecx, dword [ebp - 0x20]
cmp eax, ecx
jge 0x68d5cb
push 1
push ecx
push 0x11
mov ecx, ebx
call fcn.0068e010
test esi, esi
mov byte [ebp - 4], 1
je 0x68d5da
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
test edi, edi
mov dword [ebp - 4], 0xffffffff
je 0x68d5ec
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4