Function at 0x409d30
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 8], edx
mov dword [ebp - 4], ecx
push ebx
push esi
push edi
test ecx, ecx
je 0x409fe6
test edx, edx
je 0x409fe6
mov eax, dword [ebp + 8]
test eax, eax
je 0x409fe6
push eax
push edx
push ecx
push 0x4aaab4
push str.SELECT__char_id___partner_id___child__FROM___s__WHERE__char_id__IN___d__d__d_
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x18
cmp eax, 0xffffffff
jne 0x409de8
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x409da0
push 0x788
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
jmp 0x409fad
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x409dcc
mov byte [edx], 0
push dword [ecx]
push 0x788
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x409fad
push 0x788
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
jmp 0x409fad
mov edi, dword [ebp - 0x10]
nop dword [eax + eax]
mov ebx, dword [sym.imp.libmysql.dll_mysql_num_fields]
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x409fad
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x409fad
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x409f99
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 0x409e69
cmp dword [esi + 0x3e4], 0
je 0x409e69
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x409e67
push eax
call ebx
test eax, eax
je 0x409e67
mov eax, dword [esi + 0x3e4]
mov edi, dword [eax]
jmp 0x409e69
xor edi, edi
push edi
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0xc], eax
test esi, esi
je 0x409ea7
cmp dword [esi + 0x3e4], 0
je 0x409ea7
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x409ea5
push eax
call ebx
cmp eax, 1
jbe 0x409ea5
mov eax, dword [esi + 0x3e4]
mov edi, dword [eax + 4]
jmp 0x409ea7
xor edi, edi
push edi
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
mov ebx, eax
test esi, esi
je 0x409ee8
cmp dword [esi + 0x3e4], 0
je 0x409ee8
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x409ee6
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 2
jbe 0x409ee6
mov eax, dword [esi + 0x3e4]
mov edi, dword [eax + 8]
jmp 0x409ee8
xor edi, edi
push edi
call fcn.0046d2ec
mov edx, dword [ebp - 8]
mov esi, eax
mov eax, dword [ebp - 0xc]
add esp, 4
cmp dword [ebp - 4], eax
jne 0x409f11
mov ecx, dword [ebp + 8]
cmp edx, ebx
jne 0x409f09
cmp ecx, esi
je 0x409f57
cmp edx, esi
jne 0x409f11
cmp ecx, ebx
je 0x409f57
mov ecx, dword [ebp - 4]
cmp ecx, ebx
jne 0x409f2e
mov ecx, dword [ebp + 8]
cmp edx, eax
jne 0x409f23
cmp ecx, esi
je 0x409f57
cmp edx, esi
jne 0x409f2b
cmp ecx, eax
je 0x409f57
mov ecx, dword [ebp - 4]
cmp ecx, esi
jne 0x409df0
mov ecx, dword [ebp + 8]
cmp edx, eax
jne 0x409f41
cmp ecx, ebx
je 0x409f57
cmp edx, ebx
mov ebx, dword [sym.imp.libmysql.dll_mysql_num_fields]
jne 0x409df6
cmp ecx, eax
jne 0x409df6
mov edi, dword [0x4ad1b4]
test edi, edi
je 0x409f90
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x409f90
push eax
call dword [sym.imp.libmysql.dll_mysql_free_result]
mov dword [edi + 0x3e0], 0
mov dword [edi + 0x3e4], 0
mov dword [edi + 0x3e8], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x10]
mov dword [esi + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x409fe6
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x409fe6
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
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret