Function at 0x41f390
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], eax
push ebx
mov ebx, dword [ebp + 0x30]
push esi
mov esi, dword [ebp + 0x24]
push edi
mov edi, dword [ebp + 0x34]
test edx, edx
jle 0x41fa4b
cmp edx, 0x1000
jge 0x41fa4b
cmp dword [edx*4 + 0x4b5420], 0
je 0x41fa4b
mov eax, dword [edx*4 + 0x4b5420]
test byte [eax], 1
jne 0x41fa4b
test cl, cl
jne 0x41f427
mov eax, dword [0x4cf5d0]
test eax, eax
je 0x41f3fe
cmp byte [eax], cl
jne 0x41f403
mov eax, 0x49d9fc
push dword [ebp + 0x10]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
call fcn.0041eb00
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x14], 1
jne 0x41f4ff
mov ecx, eax
mov eax, dword [ecx + 0x1c]
add eax, 0x22
cmp eax, dword [ecx + 0x14]
jbe 0x41f460
mov ecx, dword [ebp - 0x20]
mov edx, 0x22
push str.mapif_acc_info_ack
push 0x1dc
push str.D:_ragnarokbr_rathena_srccharinter.cpp
call fcn.00440270
mov edx, dword [ebp - 0x20]
add esp, 0xc
mov esi, dword [edx*4 + 0x4b5420]
mov edx, 0x3808
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0xc]
mov word [ecx + eax], dx
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x1c]
mov eax, dword [ebp + 8]
mov dword [edx + ecx + 2], eax
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x1c]
mov eax, dword [ebp + 0x10]
mov dword [edx + ecx + 6], eax
mov edx, 0x17
mov ecx, dword [esi + 0xc]
add ecx, 0xa
add ecx, dword [esi + 0x1c]
sub edi, ecx
mov byte [ecx + 0x17], 0
mov al, byte [edi + ecx]
dec edx
mov byte [ecx], al
inc ecx
test al, al
je 0x41f4d1
test edx, edx
jne 0x41f4a4
mov ecx, dword [ebp - 0x20]
mov edx, 0x22
call fcn.004403f0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
test edx, edx
je 0x41f4e1
push edx
push 0
push ecx
call fcn.00461440
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov edx, 0x22
call fcn.004403f0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4cf5d4]
test eax, eax
je 0x41f50d
cmp byte [eax], 0
jne 0x41f512
mov eax, 0x49d9fc
push dword [ebp + 0x10]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
call fcn.0041eb00
mov eax, dword [0x4cf5d8]
add esp, 0x14
test eax, eax
je 0x41f533
cmp byte [eax], 0
jne 0x41f538
mov eax, 0x49d9fc
push dword [ebp + 0x20]
push dword [ebp + 0x18]
push edi
mov edi, dword [ebp - 0x20]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push edi
call fcn.0041eb00
mov eax, dword [0x4cf5e4]
add esp, 0x1c
test eax, eax
je 0x41f560
cmp byte [eax], 0
jne 0x41f565
mov eax, 0x49d9fc
push ebx
push esi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push edi
call fcn.0041eb00
add esp, 0x18
push dword [ebp - 0x24]
call dword [sym.imp.WS2_32.dll_inet_addr]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
mov ebx, dword [0x4ad1b8]
xor ecx, ecx
mov edi, eax
lea esi, [ecx + 0x1f]
lea ecx, [ecx + ecx*2]
mov eax, 1
lea edx, [ebx + ecx*2]
mov ecx, esi
shl eax, cl
test edi, eax
je 0x41f5ba
movzx ecx, byte [edx + 5]
movzx eax, byte [edx + 4]
shl ecx, 8
add ecx, eax
movzx eax, byte [edx + 3]
jmp 0x41f5ca
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 1]
shl ecx, 8
add ecx, eax
movzx eax, byte [edx]
shl ecx, 8
add ecx, eax
cmp ecx, 0xffff00
jae 0x41f5e4
sub esi, 1
jns 0x41f594
mov ecx, dword [str.Unknown]
jmp 0x41f5eb
mov ecx, dword [ecx*4 - 0x3b64a18]
mov eax, dword [0x4cf5e8]
test eax, eax
je 0x41f5f9
cmp byte [eax], 0
jne 0x41f5fe
mov eax, 0x49d9fc
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp - 0x20]
push ecx
push dword [ebp - 0x24]
push eax
push edi
push esi
push ebx
call fcn.0041eb00
mov eax, dword [0x4cf5ec]
add esp, 0x18
test eax, eax
je 0x41f625
cmp byte [eax], 0
jne 0x41f62a
mov eax, 0x49d9fc
push dword [ebp - 0x28]
push dword [ebp + 0x1c]
push eax
push edi
push esi
push ebx
call fcn.0041eb00
mov eax, dword [0x4cf5f0]
add esp, 0x18
test eax, eax
je 0x41f64a
cmp byte [eax], 0
jne 0x41f64f
mov eax, 0x49d9fc
push eax
push edi
push esi
push ebx
call fcn.0041eb00
push 0xf
push dword [ebp + 0x10]
push 0x4aaab4
push str.SELECT__char_id____name____char_num____class____base_level____job_level____online__FROM___s__WHERE__account_id____d_ORDER_BY__char_num__LIMIT__d
push dword [0x4ad1b4]
call fcn.0043d8e0
mov esi, dword [sym.imp.libmysql.dll_mysql_num_rows]
add esp, 0x24
cmp eax, 0xffffffff
je 0x41f948
mov eax, dword [0x4ad1b4]
test eax, eax
je 0x41f9f1
mov ecx, dword [eax + 0x3e0]
test ecx, ecx
je 0x41f94d
push ecx
call esi
or eax, edx
je 0x41f948
mov ebx, dword [ebp - 0x38]
mov esi, dword [0x4ad1b4]
mov edi, dword [sym.imp.libmysql.dll_mysql_num_fields]
test esi, esi
je 0x41fa12
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41fa12
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x41f92f
push dword [esi + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov dword [esi + 0x3e8], eax
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41f726
cmp dword [esi + 0x3e4], 0
je 0x41f726
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f724
push eax
call edi
test eax, eax
je 0x41f724
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax]
jmp 0x41f726
xor ebx, ebx
push ebx
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0x34], eax
test esi, esi
je 0x41f764
cmp dword [esi + 0x3e4], 0
je 0x41f764
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f762
push eax
call edi
cmp eax, 1
jbe 0x41f762
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax + 4]
jmp 0x41f764
xor ebx, ebx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 5], 0
mov esi, ebx
mov eax, ecx
mov edx, 0x17
sub esi, eax
mov al, byte [esi + ecx]
dec edx
mov byte [ecx], al
inc ecx
test al, al
je 0x41f787
test edx, edx
jne 0x41f776
jmp 0x41f797
test edx, edx
je 0x41f797
push edx
push 0
push ecx
call fcn.00461440
add esp, 0xc
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41f7c9
cmp dword [esi + 0x3e4], 0
je 0x41f7c9
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f7c7
push eax
call edi
cmp eax, 2
jbe 0x41f7c7
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax + 8]
jmp 0x41f7c9
xor ebx, ebx
push ebx
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
movzx eax, ax
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x41f80a
cmp dword [esi + 0x3e4], 0
je 0x41f80a
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f808
push eax
call edi
cmp eax, 3
jbe 0x41f808
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax + 0xc]
jmp 0x41f80a
xor ebx, ebx
push ebx
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0x28], eax
test esi, esi
je 0x41f848
cmp dword [esi + 0x3e4], 0
je 0x41f848
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f846
push eax
call edi
cmp eax, 4
jbe 0x41f846
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax + 0x10]
jmp 0x41f848
xor ebx, ebx
push ebx
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
movzx eax, ax
mov dword [ebp - 0x30], eax
test esi, esi
je 0x41f889
cmp dword [esi + 0x3e4], 0
je 0x41f889
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f887
push eax
call edi
cmp eax, 5
jbe 0x41f887
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax + 0x14]
jmp 0x41f889
xor ebx, ebx
push ebx
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
movzx eax, ax
mov dword [ebp - 0x24], eax
test esi, esi
je 0x41f8ca
cmp dword [esi + 0x3e4], 0
je 0x41f8ca
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41f8c8
push eax
call edi
cmp eax, 6
jbe 0x41f8c8
mov eax, dword [esi + 0x3e4]
mov ebx, dword [eax + 0x18]
jmp 0x41f8ca
xor ebx, ebx
push ebx
call fcn.0046d2ec
mov ecx, dword [ebp - 0x28]
add esp, 4
movzx edx, ax
call fcn.0041e6d0
mov ecx, 0xe1
mov esi, eax
call fcn.0040ef20
mov edi, eax
test dx, dx
mov eax, str.Offline
mov ecx, str.Online
cmove ecx, eax
mov eax, dword [ebp - 0x24]
push ecx
movsx ecx, ax
mov eax, dword [ebp - 0x30]
push ecx
movsx ecx, ax
lea eax, [ebp - 0x1c]
push ecx
push esi
push eax
push dword [ebp - 0x34]
mov eax, dword [ebp - 0x2c]
cwde
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x20]
call fcn.0041eb00
add esp, 0x2c
jmp 0x41f6ad
lea eax, [esi + 0x10]
mov dword [esi + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
jmp 0x41fa12
mov eax, dword [0x4ad1b4]
test eax, eax
je 0x41f9f1
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x41f9f1
push eax
call esi
or eax, edx
je 0x41f9f1
mov eax, dword [0x4cf5c4]
test eax, eax
je 0x41f97c
cmp byte [eax], 0
jne 0x41f981
mov eax, 0x49d9fc
push eax
push edi
push dword [ebp + 8]
push ebx
call fcn.0041eb00
mov ecx, dword [0x4ad1b4]
add esp, 0x10
test ecx, ecx
jne 0x41f9b2
push 0x245
push str.D:_ragnarokbr_rathena_srccharinter.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
jmp 0x41fa12
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x41f9d8
mov byte [edx], 0
push dword [ecx]
push 0x245
push str.D:_ragnarokbr_rathena_srccharinter.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
jmp 0x41fa0f
push 0x245
push str.D:_ragnarokbr_rathena_srccharinter.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
jmp 0x41fa12
mov eax, dword [0x4cf5f8]
test eax, eax
je 0x41f9ff
cmp byte [eax], 0
jne 0x41fa04
mov eax, 0x49d9fc
push eax
push edi
push dword [ebp + 8]
push ebx
call fcn.0041eb00
add esp, 0x10
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41fa4b
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41fa4b
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
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret