Function at 0x500f60
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x741d08
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x434
push ebx
push esi
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0xd]
push edi
push eax
lea ecx, [ebp - 0x1c]
call fcn.00503d90
mov cl, byte [ebp - 0xd]
xor ebx, ebx
mov byte [ebp - 0x14], cl
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], ebx
call fcn.004fa3b0
push 0x1f4
push 0x6f
push 0x79a158
lea edx, [ebp - 0x440]
push str.SELECT_id_AS_NpcID__ownerid_AS_FamilyID__data1_AS_MapID__data3_AS_MapLev_FROM__s_WHERE_type___d_LIMIT__d
push edx
mov dword [ebp - 4], 1
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x14
lea edx, [ebp - 0x440]
mov eax, dword [ecx]
push 1
push edx
call dword [eax]
mov esi, eax
cmp esi, ebx
je 0x5010a0
mov eax, dword [esi]
mov ecx, esi
mov dword [ebp - 0x24], ebx
call dword [eax + 0x60]
test eax, eax
jbe 0x501097
mov edx, dword [esi]
push 0
mov ecx, esi
call dword [edx + 0x44]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x44]
mov edx, dword [esi]
push 2
mov ecx, esi
mov ebx, eax
call dword [edx + 0x44]
mov edi, eax
mov eax, dword [esi]
push 3
mov ecx, esi
call dword [eax + 0x44]
mov ecx, dword [0x7fd5e8]
push 1
push edi
mov dword [ebp - 0x30], eax
mov edx, dword [ecx]
call dword [edx + 0xc]
test eax, eax
je 0x50107a
mov eax, dword [eax + 0x24]
push 4
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 4]
shr eax, 0xa
and al, 1
mov byte [ebp - 0x1d], al
je 0x50107a
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
push ebx
push eax
push ecx
mov ecx, dword [ebp - 0x28]
push edi
call fcn.00503770
lea edx, [ebp - 0x38]
lea eax, [ebp - 0x40]
push edx
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], ebx
call fcn.00441a90
mov edi, dword [ebp - 0x24]
mov edx, dword [esi]
inc edi
mov ecx, esi
mov dword [ebp - 0x24], edi
call dword [edx + 0x64]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
cmp edi, eax
jb 0x500ffc
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
xor ebx, ebx
push 0x7ac7a8
lea eax, [ebp - 0x440]
push str.SELECT_id_challenge_map_FROM__s_AS_f_WHERE_f.del_flag0_AND_f.challenge_map__0
push eax
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0xc
lea eax, [ebp - 0x440]
mov edx, dword [ecx]
push 1
push eax
call dword [edx]
mov esi, eax
cmp esi, ebx
je 0x501119
mov edx, dword [esi]
mov ecx, esi
xor edi, edi
call dword [edx + 0x60]
test eax, eax
jbe 0x501110
mov eax, dword [esi]
push 0
mov ecx, esi
call dword [eax + 0x44]
mov edx, dword [esi]
push 1
mov ecx, esi
mov ebx, eax
call dword [edx + 0x44]
mov ecx, dword [ebp - 0x28]
push ebx
push eax
call fcn.00503930
mov eax, dword [esi]
mov ecx, esi
inc edi
call dword [eax + 0x64]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x60]
cmp edi, eax
jb 0x5010df
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
xor ebx, ebx
mov ecx, dword [0x7fd5a8]
cmp ecx, ebx
jne 0x501146
push 0x1bc
push 0x797a90
push str.g_pFamilyMgr
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor ecx, ecx
lea edx, [ebp - 0x1c]
push ebx
push edx
call fcn.0053fad0
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x501198
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax + 4]
cmp esi, ebx
je 0x501184
mov eax, dword [esi + 0xc]
lea ecx, [ebp - 0x1c]
push eax
call fcn.00440650
mov edi, dword [esi + 8]
push 0x18
push esi
call fcn.004051b0
add esp, 8
cmp edi, ebx
mov esi, edi
jne 0x501161
mov eax, dword [ebp - 0x1c]
mov dword [eax + 8], eax
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 4], ebx
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xc], eax
xor eax, eax
mov dword [ebp - 0x18], eax
cmp eax, ebx
mov dword [ebp - 4], 2
je 0x5011e2
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax + 4]
cmp esi, ebx
je 0x5011d0
mov edx, dword [esi + 0xc]
lea ecx, [ebp - 0x1c]
push edx
call fcn.00440650
mov edi, dword [esi + 8]
push 0x18
push esi
call fcn.004051b0
add esp, 8
cmp edi, ebx
mov esi, edi
jne 0x5011ad
mov eax, dword [ebp - 0x1c]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], ebx
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0xc], eax
mov dword [ebp - 0x18], ebx
mov esi, dword [ebp - 0x1c]
mov ecx, 0x7e5430
call fcn.00401df0
mov ecx, dword [0x7e53f8]
mov dword [esi], ecx
mov dword [0x7e53f8], esi
mov dword [0x7e5430], ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret