Function at 0x505340
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x741f26
push eax
mov eax, 0x1164
mov dword fs:[0], esp
call fcn.00702820
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, ecx
test edi, edi
mov dword [ebp - 0x10], ebx
je 0x505829
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x505808
cmp ecx, 0x51
jge 0x505808
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
push eax
push esi
mov ecx, ebx
call fcn.00506460
test al, al
je 0x505829
mov eax, dword [ebx + esi*8 + 0x14]
xor edi, edi
cmp eax, edi
je 0x5053fc
call fcn.007028fe
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
mov eax, dword [ebx + esi*8 + 0x14]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [ebx + esi*8 + 0x10]
add eax, ecx
cmp edx, eax
setge al
test al, al
je 0x505576
call fcn.007028fe
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov dword [ebx + esi*8 + 0x14], edx
mov edx, dword [ebp + 8]
lea eax, [esi + 1]
mov dword [ebp - 0x18], eax
push edx
mov eax, dword [ebx + eax*4]
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], edi
push edx
mov ecx, dword [eax]
push eax
push ecx
call fcn.00507020
mov eax, dword [ebp - 0x14]
add esp, 0x10
cmp eax, edi
ja 0x505576
cmp dword [ebx + esi*8 + 0x14], edi
jne 0x505451
mov dword [ebx + esi*8 + 0x10], 0x258
call fcn.007028fe
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [ebx + esi*8 + 0x14], edx
lea eax, [esi + esi*2]
lea ecx, [eax + eax*4]
xor eax, eax
lea ebx, [ebx + ecx*8]
mov ecx, 0x1e
lea edi, [ebx + 0x2c]
mov dword [ebp - 0x14], edi
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
mov dword [ebx + 0x30], esi
mov ecx, edi
mov edx, dword [edi]
call dword [edx + 4]
add edi, 8
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x4c], 0
push 0x10
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
lea ecx, [ebx + 0x3c]
push eax
push ecx
call fcn.0040cc10
mov edx, dword [ebp + 0x10]
push 0x51
add ebx, 0x50
push edx
push ebx
call fcn.0040cc10
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
add esp, 0x18
push eax
call fcn.00504f80
test al, al
je 0x505571
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x1170]
push ecx
push 0x7ad4f0
push edx
call fcn.0070258b
add esp, 0xc
lea ecx, [ebp - 0x970]
call fcn.005c28a0
push 0
push 0
push 0x840
push 0xffffff
lea eax, [ebp - 0x1170]
push 0
push eax
push str.ALLUSERS
push str.SYSTEM
lea ecx, [ebp - 0x970]
mov dword [ebp - 4], 0
call fcn.005c29b0
test eax, eax
jne 0x505539
push 0xf6
push 0x7ad2bc
push str.msg.Create__TXTATR_MESSAGEBOX__szText_
push str.IF_OK
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x50554a
mov edx, dword [edi]
lea eax, [ebp - 0x970]
push eax
mov ecx, edi
call dword [edx + 0x1b0]
lea ecx, [ebp - 0x970]
mov dword [ebp - 4], 0xffffffff
call fcn.005c2950
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
mov ebx, dword [ebp - 0x10]
xor edi, edi
push 0xc
call fcn.00728cf3
add esp, 4
cmp eax, edi
je 0x505592
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax], 0x754ab4
mov edi, eax
test edi, edi
mov dword [ebp + 0xc], edi
je 0x505640
mov ecx, dword [0x7fd5f0]
push 0x7b4240
push 0x7ad28c
lea edx, [ebp - 0x118]
push str.SELECT__FROM__s_WHERE__s0_LIMIT_1
push edx
mov dword [ebp - 0x10], ecx
call fcn.0070258b
mov ecx, dword [0x801a70]
add esp, 0x10
test ecx, ecx
jne 0x505618
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x118]
push 0
push edx
mov eax, dword [ecx]
call dword [eax]
push eax
mov ecx, 0x801a70
call fcn.0047bd90
mov ecx, dword [0x801a70]
test ecx, ecx
setne al
test al, al
jne 0x505618
push 0x38
push str.....GameBaseCodeMTGameData.h
push str.CreateNewDefault_pDb_
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x505640
mov eax, dword [ecx]
push 0
call dword [eax]
test eax, eax
mov dword [edi + 4], eax
je 0x505634
mov edx, dword [eax]
push 0x7b4240
mov ecx, eax
call dword [edx + 0x30]
mov dword [edi + 8], eax
mov edx, dword [edi + 4]
test edx, edx
setne al
test al, al
jne 0x505659
push 0x100
push 0x7ad2bc
push str.pData__pData__Create_Database____ID_NONE_
push str.IF_OK
jmp 0x50581c
mov ecx, dword [ebp + 0xc]
push esi
push 1
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, dword [ebp + 0xc]
mov edi, dword [ecx]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp + 0xc]
push eax
push 3
call dword [edi + 0x10]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push 0x10
mov edi, dword [edx]
lea ecx, [eax + 8]
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [ebp + 0xc]
push eax
push 4
call dword [edi + 0x14]
mov ecx, dword [ebp + 0xc]
push 0
push 1
mov edi, dword [ecx]
call fcn.0040ab00
mov ecx, dword [ebp + 0xc]
add esp, 8
push eax
push 5
call dword [edi + 0x10]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push 0x51
push eax
mov edx, dword [ecx]
push 7
call dword [edx + 0x14]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
call dword [edx + 0x30]
inc esi
xor edx, edx
mov dword [ebp - 0x18], esi
mov eax, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
mov ecx, dword [eax]
cmp ecx, eax
je 0x505717
mov ecx, dword [ecx]
inc edx
cmp ecx, eax
jne 0x5056dc
test edx, edx
jbe 0x505717
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
mov dword [ebp + 8], eax
je 0x505717
mov ecx, dword [ebp + 0xc]
mov esi, dword [eax]
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, esi
mov esi, dword [ebp + 8]
push eax
push 2
mov ecx, esi
call dword [edx + 0x10]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x2c]
mov esi, dword [ebp - 0x18]
lea ecx, [ebp + 0xc]
push ecx
push ecx
push esp
mov ecx, edi
call fcn.00506550
lea edx, [ebp + 8]
mov ecx, edi
push edx
call fcn.00506560
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebx + 0x194], eax
mov edi, dword [edi]
xor ecx, ecx
mov eax, dword [edi]
cmp eax, edi
je 0x50574e
mov eax, dword [eax]
inc ecx
cmp eax, edi
jne 0x505747
lea edx, [ecx + ecx*4]
lea eax, [ebp - 0xd70]
shl edx, 1
push edx
push ecx
push esi
push 0x7ad440
push eax
call fcn.0070258b
add esp, 0x14
lea ecx, [ebp - 0x544]
call fcn.005c28a0
push 0
push 0
push 0x840
push 0xffffff
lea ecx, [ebp - 0xd70]
push 0
push ecx
push str.ALLUSERS
push str.SYSTEM
lea ecx, [ebp - 0x544]
mov dword [ebp - 4], 1
call fcn.005c29b0
test eax, eax
jne 0x5057cf
push 0x11e
push 0x7ad2bc
push str.msg.Create__TXTATR_MESSAGEBOX__szText_
push str.IF_OK
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x5057e1
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x544]
push eax
mov edx, dword [ecx]
call dword [edx + 0x1b0]
lea ecx, [ebp - 0x544]
mov dword [ebp - 4], 0xffffffff
call fcn.005c2950
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
push 0xdf
push 0x7ad2bc
push str._nLen_0__nLen____MAX_ADVERT_SIZE_
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor al, al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc