Function at 0x418240
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, ecx
mov dword [ebp - 4], edx
push eax
push 0x4aaab4
push str.SELECT__account_id___class___guild_id__FROM___s__WHERE__char_id____d
push dword [0x4ad1b4]
mov dword [ebp - 0xc], eax
call fcn.0043d8e0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4182f6
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x4182a0
push 0x1e9
push str.D:_ragnarokbr_rathena_srccharchar_logif.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x4182d3
mov byte [edx], 0
push dword [ecx]
push 0x1e9
push str.D:_ragnarokbr_rathena_srccharchar_logif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x1e9
push str.D:_ragnarokbr_rathena_srccharchar_logif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x418548
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x418515
push eax
call dword [sym.imp.libmysql.dll_mysql_num_rows]
cmp eax, 1
jne 0x41850f
test edx, edx
jne 0x41850f
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x418548
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x418515
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x41836b
push dword [esi + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov dword [esi + 0x3e8], eax
jmp 0x418387
lea eax, [esi + 0x10]
mov dword [esi + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
test eax, eax
jne 0x41850f
mov esi, dword [0x4ad1b4]
mov ebx, dword [sym.imp.libmysql.dll_mysql_num_fields]
test esi, esi
je 0x4183bf
cmp dword [esi + 0x3e4], 0
je 0x4183bf
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x4183bb
push eax
call ebx
test eax, eax
je 0x4183bb
mov eax, dword [esi + 0x3e4]
mov esi, dword [eax]
jmp 0x4183c2
xor esi, esi
jmp 0x4183c2
mov esi, dword [ebp - 0x18]
push esi
call fcn.0046d2ec
mov edi, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0x14], eax
test edi, edi
je 0x418400
cmp dword [edi + 0x3e4], 0
je 0x418400
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x4183fe
push eax
call ebx
cmp eax, 1
jbe 0x4183fe
mov eax, dword [edi + 0x3e4]
mov esi, dword [eax + 4]
jmp 0x418400
xor esi, esi
push esi
call fcn.0046d2ec
mov edi, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 8], eax
test edi, edi
je 0x41843e
cmp dword [edi + 0x3e4], 0
je 0x41843e
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x41843c
push eax
call ebx
cmp eax, 2
jbe 0x41843c
mov eax, dword [edi + 0x3e4]
mov esi, dword [eax + 8]
jmp 0x41843e
xor esi, esi
push esi
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
mov edi, eax
test esi, esi
je 0x418482
mov ecx, dword [esi + 0x3e0]
test ecx, ecx
je 0x418482
push ecx
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 ebx, dword [ebp - 0x14]
mov edx, ebx
mov ecx, dword [ebp - 4]
push edi
push dword [ebp - 8]
push dword [ebp - 0xc]
call fcn.00417a80
mov edx, dword [0x4b9420]
add esp, 0xc
xor esi, esi
test edx, edx
jle 0x4184e7
mov ecx, dword [esi*4 + 0x4b5420]
test ecx, ecx
je 0x4184bc
mov eax, dword [ecx + 0x44]
test eax, eax
je 0x4184bc
cmp dword [eax + 4], ebx
je 0x4184c3
inc esi
cmp esi, edx
jl 0x4184a5
jmp 0x4184e7
cmp esi, edx
jge 0x4184e7
lea eax, [esi - 1]
cmp eax, 0xffe
ja 0x4184e7
test byte [ecx], 1
jne 0x4184e7
mov ecx, esi
call fcn.004416b0
mov eax, dword [esi*4 + 0x4b5420]
or byte [eax], 1
mov eax, 0x2b0d
mov dword [ebp - 0x12], ebx
mov word [ebp - 0x14], ax
lea ecx, [ebp - 0x14]
mov eax, dword [ebp - 4]
mov edx, 7
mov byte [ebp - 0xe], al
call fcn.004190a0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x418548
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x418548
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
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret