Function at 0x40a2b0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0x140
push 0
push 0x4aa570
call fcn.00461440
add esp, 0xc
push 0x140
push 0
push 0x4aa430
call fcn.00461440
add esp, 0xc
push 0x140
push 0
push 0x4aa230
call fcn.00461440
add esp, 0xc
push dword [0x4a7a84]
push 0x109d
push 0x1004
push 0xfe0
push 0xfda
push 0xfc1
push 0xfab
push 0xa
push 0x4aaab4
push str.SELECT__char_id___fame___name__FROM___s__WHERE__fame__0_AND___class__d_OR__class__d_OR__class__d_OR__class__d_OR__class__d_OR__class__d_OR__class__d__ORDER_BY__fame__DESC_LIMIT_0__d
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x2c
cmp eax, 0xffffffff
jne 0x40a393
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x40a353
push 0x7ed
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x40a38b
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x40a37c
mov byte [edx], 0
push dword [ecx]
push 0x7ed
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x40a393
push 0x7ed
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
cmp dword [0x4a7a84], 0
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 8], 0
jle 0x40a520
mov dword [ebp - 4], 0x4aa574
nop dword [eax]
nop dword [eax + eax]
mov ebx, dword [0x4ad1b4]
test ebx, ebx
je 0x40a520
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a520
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [ebx + 0x3e4], eax
test eax, eax
je 0x40a50c
push dword [ebx + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov dword [ebx + 0x3e8], eax
mov ebx, dword [0x4ad1b4]
test ebx, ebx
je 0x40a437
cmp dword [ebx + 0x3e4], 0
je 0x40a437
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a435
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x40a435
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax]
jmp 0x40a437
xor esi, esi
push esi
call fcn.0046d2ec
mov ecx, dword [ebp - 4]
add esp, 4
mov ebx, dword [0x4ad1b4]
mov dword [ecx - 4], eax
test ebx, ebx
je 0x40a487
cmp dword [ebx + 0x3e4], 0
je 0x40a487
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a483
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 1
jbe 0x40a483
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax + 4]
mov eax, dword [ebx + 0x3e8]
mov edi, dword [eax + 4]
jmp 0x40a487
xor edi, edi
xor esi, esi
push esi
call fcn.0046d2ec
mov ecx, dword [ebp - 4]
add esp, 4
mov ebx, dword [0x4ad1b4]
mov dword [ecx], eax
test ebx, ebx
je 0x40a4d6
cmp dword [ebx + 0x3e4], 0
je 0x40a4d6
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a4d2
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 2
jbe 0x40a4d2
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax + 8]
mov eax, dword [ebx + 0x3e8]
mov edi, dword [eax + 8]
jmp 0x40a4d6
xor esi, esi
xor edi, edi
mov ebx, dword [ebp - 4]
mov eax, 0x18
cmp edi, eax
cmovb eax, edi
push eax
lea eax, [ebx + 4]
push esi
push eax
call fcn.00460ec0
mov eax, dword [ebp - 8]
add ebx, 0x20
inc eax
mov dword [ebp - 4], ebx
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, dword [0x4a7a84]
jl 0x40a3c0
jmp 0x40a520
lea eax, [ebx + 0x10]
mov dword [ebx + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
push dword [0x4a7a88]
push 0x10a3
push 0x100b
push 0xfee
push 0xfe7
push 0xfc9
push 0xfb3
push 0x12
push 0x4aaab4
push str.SELECT__char_id___fame___name__FROM___s__WHERE__fame__0_AND___class__d_OR__class__d_OR__class__d_OR__class__d_OR__class__d_OR__class__d_OR__class__d__ORDER_BY__fame__DESC_LIMIT_0__d
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x2c
cmp eax, 0xffffffff
jne 0x40a5be
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x40a57e
push 0x7fc
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x40a5b6
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x40a5a7
mov byte [edx], 0
push dword [ecx]
push 0x7fc
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x40a5be
push 0x7fc
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
cmp dword [0x4a7a88], 0
mov dword [ebp - 8], 0
jle 0x40a740
mov dword [ebp - 4], 0x4aa434
nop dword [eax]
mov ebx, dword [0x4ad1b4]
test ebx, ebx
je 0x40a740
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a740
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [ebx + 0x3e4], eax
test eax, eax
je 0x40a72c
push dword [ebx + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov dword [ebx + 0x3e8], eax
mov ebx, dword [0x4ad1b4]
test ebx, ebx
je 0x40a657
cmp dword [ebx + 0x3e4], 0
je 0x40a657
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a655
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x40a655
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax]
jmp 0x40a657
xor esi, esi
push esi
call fcn.0046d2ec
mov ecx, dword [ebp - 4]
add esp, 4
mov ebx, dword [0x4ad1b4]
mov dword [ecx - 4], eax
test ebx, ebx
je 0x40a6a7
cmp dword [ebx + 0x3e4], 0
je 0x40a6a7
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a6a3
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 1
jbe 0x40a6a3
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax + 4]
mov eax, dword [ebx + 0x3e8]
mov edi, dword [eax + 4]
jmp 0x40a6a7
xor esi, esi
xor edi, edi
push esi
call fcn.0046d2ec
mov ecx, dword [ebp - 4]
add esp, 4
mov ebx, dword [0x4ad1b4]
mov dword [ecx], eax
test ebx, ebx
je 0x40a6f6
cmp dword [ebx + 0x3e4], 0
je 0x40a6f6
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a6f2
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 2
jbe 0x40a6f2
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax + 8]
mov eax, dword [ebx + 0x3e8]
mov edi, dword [eax + 8]
jmp 0x40a6f6
xor esi, esi
xor edi, edi
mov ebx, dword [ebp - 4]
mov eax, 0x18
cmp edi, eax
cmovb eax, edi
push eax
lea eax, [ebx + 4]
push esi
push eax
call fcn.00460ec0
mov eax, dword [ebp - 8]
add ebx, 0x20
inc eax
mov dword [ebp - 4], ebx
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, dword [0x4a7a88]
jl 0x40a5e0
jmp 0x40a740
lea eax, [ebx + 0x10]
mov dword [ebx + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
push dword [0x4a7a80]
push 0x1081
push 0xfce
push 0x4aaab4
push str.SELECT__char_id___fame___name__FROM___s__WHERE__fame__0_AND___class__d_OR__class__d__ORDER_BY__fame__DESC_LIMIT_0__d
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x18
cmp eax, 0xffffffff
jne 0x40a7c8
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x40a788
push 0x80b
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x40a7c0
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x40a7b1
mov byte [edx], 0
push dword [ecx]
push 0x80b
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x40a7c8
push 0x80b
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
cmp dword [0x4a7a80], 0
mov dword [ebp - 8], 0
jle 0x40a950
mov dword [ebp - 4], 0x4aa234
nop dword [eax]
nop word [eax + eax]
mov ebx, dword [0x4ad1b4]
test ebx, ebx
je 0x40a950
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a950
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [ebx + 0x3e4], eax
test eax, eax
je 0x40a93c
push dword [ebx + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov dword [ebx + 0x3e8], eax
mov ebx, dword [0x4ad1b4]
test ebx, ebx
je 0x40a867
cmp dword [ebx + 0x3e4], 0
je 0x40a867
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a865
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x40a865
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax]
jmp 0x40a867
xor esi, esi
push esi
call fcn.0046d2ec
mov ecx, dword [ebp - 4]
add esp, 4
mov ebx, dword [0x4ad1b4]
mov dword [ecx - 4], eax
test ebx, ebx
je 0x40a8b7
cmp dword [ebx + 0x3e4], 0
je 0x40a8b7
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a8b3
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 1
jbe 0x40a8b3
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax + 4]
mov eax, dword [ebx + 0x3e8]
mov edi, dword [eax + 4]
jmp 0x40a8b7
xor esi, esi
xor edi, edi
push esi
call fcn.0046d2ec
mov ecx, dword [ebp - 4]
add esp, 4
mov ebx, dword [0x4ad1b4]
mov dword [ecx], eax
test ebx, ebx
je 0x40a906
cmp dword [ebx + 0x3e4], 0
je 0x40a906
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x40a902
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 2
jbe 0x40a902
mov eax, dword [ebx + 0x3e4]
mov esi, dword [eax + 8]
mov eax, dword [ebx + 0x3e8]
mov edi, dword [eax + 8]
jmp 0x40a906
xor esi, esi
xor edi, edi
mov ebx, dword [ebp - 4]
mov eax, 0x18
cmp edi, eax
cmovb eax, edi
push eax
lea eax, [ebx + 4]
push esi
push eax
call fcn.00460ec0
mov eax, dword [ebp - 8]
add ebx, 0x20
inc eax
mov dword [ebp - 4], ebx
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, dword [0x4a7a80]
jl 0x40a7f0
jmp 0x40a950
lea eax, [ebx + 0x10]
mov dword [ebx + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x40a989
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x40a989
push eax
call dword [sym.imp.libmysql.dll_mysql_free_result]
mov dword [esi + 0x3e0], 0
mov dword [esi + 0x3e4], 0
mov dword [esi + 0x3e8], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret