Function at 0x4705f4
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14c
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x144], eax
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
call fcn.0043f37c
mov ebx, eax
lea eax, [ebp - 0x134]
mov dword [esp], eax
call fcn.0066643c
cmp si, 6
jbe 0x470a24
cmp si, 7
jne 0x47067f
mov dword [esp + 4], 0x1a
mov dword [esp], 0x8dfd80
call fcn.0041b8da
mov edi, eax
mov dword [esp + 4], str.SELECT__maglevel____name__FROM__players__ORDER_BY__maglevel__DESC___manaspent__DESC_LIMIT
lea eax, [ebp - 0x12c]
mov dword [esp], eax
call fcn.0076107c
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00702728
jmp 0x4706b7
mov dword [esp + 4], 0x1a
mov dword [esp], 0x8dfd80
call fcn.0041b8da
mov edi, eax
mov dword [esp + 4], str.SELECT__level____name__FROM__players__ORDER_BY__level__DESC___experience__DESC_LIMIT
lea eax, [ebp - 0x12c]
mov dword [esp], eax
call fcn.0076107c
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00702728
mov eax, dword [ebx]
mov edi, dword [eax + 0x1c]
lea eax, [ebp - 0x74]
lea edx, [ebp - 0x128]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.006de294
sub esp, 4
lea eax, [ebp - 0x74]
mov dword [esp + 4], eax
mov dword [esp], ebx
call edi
mov ebx, eax
lea eax, [ebp - 0x74]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470701
test ebx, ebx
je 0x470ce9
cmp si, 7
jne 0x470768
mov eax, dword [ebx]
mov edi, dword [eax]
lea edx, [ebp - 0x69]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x7d1c8a
lea eax, [ebp - 0x70]
mov dword [esp], eax
call fcn.007041ec
lea edx, [ebp - 0x70]
mov dword [esp + 4], edx
mov dword [esp], ebx
call edi
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x70]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470811
mov eax, dword [ebx]
mov edi, dword [eax]
lea edx, [ebp - 0x61]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x7d1c93
lea eax, [ebp - 0x68]
mov dword [esp], eax
call fcn.007041ec
lea edx, [ebp - 0x68]
mov dword [esp + 4], edx
mov dword [esp], ebx
call edi
mov dword [ebp - 0x140], eax
mov edi, dword [ebp - 0x68]
sub edi, 0xc
cmp edi, 0x7bf7a4
je 0x470811
cmp dword [0x8e6f60], 0
je 0x4707ca
mov dword [esp + 4], 0xffffffff
lea eax, [edi + 8]
mov dword [esp], eax
call fcn.006b2de0
mov dword [ebp - 0x148], eax
jmp 0x4707d7
mov eax, dword [edi + 8]
mov dword [ebp - 0x148], eax
dec eax
mov dword [edi + 8], eax
cmp dword [ebp - 0x148], 0
jg 0x470811
lea edx, [ebp - 0x23]
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.00702c78
jmp 0x470811
mov eax, dword [ebx]
mov edi, dword [eax + 8]
lea eax, [ebp - 0x59]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x7d1c99
lea eax, [ebp - 0x60]
mov dword [esp], eax
call fcn.007041ec
lea eax, [ebp - 0x78]
lea edx, [ebp - 0x60]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call edi
sub esp, 4
mov edi, dword [ebp - 0x60]
sub edi, 0xc
cmp edi, 0x7bf7a4
je 0x4708cc
jmp 0x470868
cmp dword [0x8e6f60], 0
je 0x47088c
mov dword [esp + 4], 0xffffffff
lea eax, [edi + 8]
mov dword [esp], eax
call fcn.006b2de0
mov dword [ebp - 0x148], eax
jmp 0x470899
mov eax, dword [edi + 8]
mov dword [ebp - 0x148], eax
dec eax
mov dword [edi + 8], eax
cmp dword [ebp - 0x148], 0
jg 0x4708cc
lea eax, [ebp - 0x22]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00702c78
jmp 0x4708cc
mov eax, dword [ebp - 0x78]
cmp dword [eax - 0xc], 0
je 0x4709a4
lea eax, [ebp - 0x78]
mov dword [esp + 4], eax
lea eax, [ebp - 0x50]
mov dword [esp], eax
call fcn.00704290
lea eax, [ebp - 0x50]
mov dword [esp + 4], eax
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.00704290
mov edx, dword [ebp - 0x140]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x144]
mov edi, dword [eax + 4]
cmp edi, dword [eax + 8]
je 0x47093f
test edi, edi
je 0x470933
lea eax, [ebp - 0x58]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00704290
mov eax, dword [ebp - 0x54]
mov dword [edi + 4], eax
jmp 0x470933
mov edx, dword [ebp - 0x144]
add dword [edx + 4], 8
jmp 0x470969
lea eax, [ebp - 0x58]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x144]
mov dword [esp], eax
call fcn.00739048
jmp 0x470969
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470985
lea eax, [ebp - 0x50]
mov dword [esp], eax
call fcn.0070479c
jmp 0x4709a4
mov edi, dword [ebp - 0x78]
sub edi, 0xc
mov eax, 0x7bf7a4
cmp eax, edi
je 0x470a07
cmp dword [0x8e6f60], 0
je 0x4709d7
mov dword [esp + 4], 0xffffffff
lea eax, [edi + 8]
mov dword [esp], eax
call fcn.006b2de0
mov dword [ebp - 0x140], eax
jmp 0x4709e6
mov edx, dword [edi + 8]
mov dword [ebp - 0x140], edx
mov eax, edx
dec eax
mov dword [edi + 8], eax
cmp dword [ebp - 0x140], 0
jg 0x470a07
lea eax, [ebp - 0x21]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00702c78
jmp 0x470a07
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 0x14]
test al, al
jne 0x470709
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 0x10]
jmp 0x470ce9
mov dword [esp + 4], 0x1a
mov dword [esp], 0x8dfd80
call fcn.0041b8da
mov edi, eax
mov dword [esp + 4], str.SELECT__player_skills_._value____players_._name__FROM__player_skills___players__WHERE__player_skills_._skillid_
lea eax, [ebp - 0x12c]
mov dword [esp], eax
call fcn.0076107c
movzx esi, si
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00701d98
mov dword [esp + 4], str._AND__player_skills_._player_id__players_._id__ORDER_BY__player_skills_._value__DESC___player_skills_._count__DESC_LIMIT
mov dword [esp], eax
call fcn.0076107c
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00702728
mov eax, dword [ebx]
mov esi, dword [eax + 0x1c]
lea eax, [ebp - 0x4c]
lea edx, [ebp - 0x128]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.006de294
sub esp, 4
lea eax, [ebp - 0x4c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call esi
mov ebx, eax
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470ac5
test ebx, ebx
je 0x470ce9
lea esi, [ebp - 0x48]
lea edi, [ebp - 0x78]
mov eax, dword [ebx]
mov eax, dword [eax + 8]
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x41]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x7d1c99
mov dword [esp], esi
call fcn.007041ec
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [ebp - 0x140]
sub esp, 4
mov dword [esp], esi
call fcn.0070479c
jmp 0x470b3e
mov eax, dword [ebp - 0x78]
cmp dword [eax - 0xc], 0
je 0x470cb2
mov eax, dword [ebx]
mov eax, dword [eax]
mov dword [ebp - 0x140], eax
lea edx, [ebp - 0x29]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x7d1d8f
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.007041ec
lea edx, [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], ebx
call dword [ebp - 0x140]
mov dword [ebp - 0x140], eax
mov dword [esp + 4], edi
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00704290
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.00704290
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.00704290
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x144]
mov edx, dword [edx + 4]
mov dword [ebp - 0x140], edx
mov eax, dword [ebp - 0x144]
cmp edx, dword [eax + 8]
je 0x470c12
test edx, edx
je 0x470c06
lea eax, [ebp - 0x40]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00704290
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x140]
mov dword [edx + 4], eax
jmp 0x470c06
mov eax, dword [ebp - 0x144]
add dword [eax + 4], 8
jmp 0x470c42
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x140]
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x144]
mov dword [esp], eax
call fcn.00739048
jmp 0x470c42
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470c5e
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470c7a
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470c96
lea edx, [ebp - 0x30]
mov dword [esp], edx
call fcn.0070479c
jmp 0x470cb2
mov dword [esp], edi
call fcn.0070479c
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 0x14]
test al, al
jne 0x470ad3
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 0x10]
jmp 0x470ce9
mov dword [ebp - fcn.006668d4], vtable.o.14.0
mov dword [ebp - 0x100], 0x824814
mov dword [ebp - 0x12c], 0x824800
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x7d1095
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.007041ec
mov eax, dword [ebp - 0x20]
mov edx, dword [eax - 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x104]
mov dword [esp], eax
call fcn.0070342c
mov eax, dword [ebp - 0x108]
test al, 3
jne 0x470d4e
mov ebx, 0
jmp 0x470d57
mov eax, dword [ebp - 0x104]
mov ebx, dword [eax - 0xc]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x104]
mov dword [esp + 4], eax
lea eax, [ebp - 0x128]
mov dword [esp], eax
call fcn.00717e3c
jmp 0x470d8f
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470da3
mov edx, 0x8d18a0
mov eax, dword [edx]
dec eax
mov dword [edx], eax
test eax, eax
jne 0x470e67
mov dword [esp + 4], 0
mov dword [esp], 0x8d18a4
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
sub esp, 8
mov edi, 0x8d18a8
mov dword [esp + 4], 0x80000000
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
sub esp, 8
test eax, 0x40000000
jne 0x470e67
cmp eax, 0x80000000
je 0x470e67
mov esi, dword [0x8d18a8]
mov eax, dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov dword [ebp - 0x13c], eax
mov eax, esi
or eax, 0x40000000
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [ebp - 0x13c]
sub esp, 0xc
cmp esi, eax
je 0x470e28
mov esi, eax
jmp 0x470e05
test esi, 0x40000000
jne 0x470e67
mov dword [esp], 0x8d18a8
call fcn.0064673c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
jmp 0x470e67
mov eax, dword [0x8210c4]
mov dword [ebp - 0x134], eax
mov eax, dword [eax - 0xc]
mov edx, dword [0x8210e4]
mov dword [ebp + eax - 0x134], edx
mov eax, dword [0x8210e8]
mov dword [ebp - 0x12c], eax
mov dword [ebp - fcn.00718768], 0x838ce8
lea eax, [ebp - 0x104]
mov dword [esp], eax
call fcn.0070479c
jmp 0x470ed2
mov dword [ebp - method.c_streambufIwSt11char_traitsIwEE.virtual_0], vtable.c_streambufIwSt11char_traitsIwEE.0
lea ebx, [ebp - 0x134]
lea eax, [ebp - 0x10c]
mov dword [esp], eax
call fcn.0072e050
mov eax, dword [0x8210c8]
mov dword [ebp - 0x134], eax
mov eax, dword [eax - 0xc]
mov edx, dword [0x8210dc]
mov dword [ebx + eax], edx
mov eax, dword [0x8210d4]
mov dword [ebp - 0x12c], eax
mov eax, dword [eax - 0xc]
mov edx, dword [0x8210d8]
mov dword [ebx + eax + 8], edx
mov eax, dword [0x8210cc]
mov dword [ebp - 0x134], eax
mov eax, dword [eax - 0xc]
mov edx, dword [0x8210d0]
mov dword [ebx + eax], edx
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x100], 0x839710
lea eax, [ebp - 0x100]
mov dword [esp], eax
call fcn.00750944
jmp 0x470f82
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret 4