Function at 0x411580
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
mov dword [esp + 8], edx
push esi
push edi
mov esi, dword [ebx*4 + 0x4b5420]
test byte [esi], 1
jne 0x411946
mov edi, dword [esi + 0x18]
mov ecx, dword [esi + 0x20]
sub edi, ecx
mov dword [esp + 0x14], edi
cmp edi, 6
jb 0x411946
test edx, edx
je 0x4118fa
cmp byte [edx], 0
je 0x4118fa
mov eax, dword [esi + 8]
mov edi, dword [eax + ecx + 2]
lea eax, [ebx - 1]
mov ecx, 6
cmp eax, 0xffe
ja 0x411618
mov eax, dword [esi + 0x20]
add eax, ecx
cmp dword [esi + 0x18], eax
jae 0x411615
push ebx
push dword [esp + 0x18]
push ecx
push str.RFIFOSKIP:_skipped_past_end_of_read_buffer__Adjusting_from__u_to__d__session__d__n
call fcn.00442810
mov eax, dword [ebx*4 + 0x4b5420]
add esp, 0x10
mov edx, dword [esp + 0x10]
test byte [eax], 1
je 0x41160f
xor ecx, ecx
jmp 0x411615
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
add dword [esi + 0x20], ecx
xor ecx, ecx
lea eax, [edx + 0x18]
nop dword [eax]
cmp dword [eax - 4], edi
je 0x41165e
cmp dword [eax], edi
je 0x411654
cmp dword [eax + 4], edi
je 0x41164f
cmp dword [eax + 8], edi
je 0x41164a
cmp dword [eax + 0xc], edi
je 0x411645
add ecx, 5
add eax, 0x14
cmp ecx, 0xf
jb 0x411620
jmp 0x411655
add ecx, 4
jmp 0x411655
add ecx, 3
jmp 0x411655
add ecx, 2
jmp 0x411655
inc ecx
cmp ecx, 0xf
je 0x4118dc
push edi
push 0x4aaab4
push str.SELECT__delete_date___party_id___guild_id__FROM___s__WHERE__char_id__d
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x10
test eax, eax
jne 0x411881
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x411881
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x411881
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x41186d
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 0x4116f8
cmp dword [esi + 0x3e4], 0
je 0x4116f8
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x4116f4
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x4116f4
mov eax, dword [esi + 0x3e4]
mov esi, dword [eax]
jmp 0x4116fc
xor esi, esi
jmp 0x4116fc
mov esi, dword [esp + 0x1c]
push 0xa
push 0
push esi
call fcn.0046a591
mov dword [esp + 0x1c], eax
add esp, 0xc
mov eax, dword [0x4ad1b4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x41174a
cmp dword [eax + 0x3e4], 0
je 0x41174a
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x411748
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 1
jbe 0x411748
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x3e4]
mov esi, dword [eax + 4]
jmp 0x41174a
xor esi, esi
push 0xa
push 0
push esi
call fcn.0046a591
mov dword [esp + 0x24], eax
add esp, 0xc
mov eax, dword [0x4ad1b4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x411798
cmp dword [eax + 0x3e4], 0
je 0x411798
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x411796
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 2
jbe 0x411796
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x3e4]
mov esi, dword [eax + 8]
jmp 0x411798
xor esi, esi
push 0xa
push 0
push esi
call fcn.0046a591
add esp, 0xc
mov ecx, eax
cmp dword [esp + 0x10], 0
je 0x4117b9
push 0
push 0
push 0
jmp 0x4118e2
mov eax, dword [0x4a9e00]
test al, 2
je 0x4117d1
test ecx, ecx
je 0x4117d1
push 0
push 0
push 4
jmp 0x4118e2
test al, 1
je 0x4117e7
cmp dword [esp + 0x18], 0
je 0x4117e7
push 0
push 0
push 5
jmp 0x4118e2
push 0
call fcn.0046d284
add esp, 4
mov ecx, eax
mov eax, dword [0x4a99d8]
mov esi, edx
cdq
add eax, ecx
push edi
push eax
push 0x4aaab4
push str.UPDATE___s__SET__delete_date__lu_WHERE__char_id__d
push dword [0x4ad1b4]
adc edx, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
call fcn.0043d8e0
add esp, 0x14
test eax, eax
je 0x411861
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x411843
push 0x228
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x4118d4
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x41185a
mov byte [edx], 0
push dword [ecx]
push 0x228
jmp 0x4118b1
push 0x228
jmp 0x4118ca
push dword [esp + 0x18]
push dword [esp + 0x18]
push 1
jmp 0x4118e2
lea eax, [esi + 0x10]
mov dword [esi + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x41189c
push 0x209
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x4118d4
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x4118c5
mov byte [edx], 0
push dword [ecx]
push 0x209
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x4118dc
push 0x209
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
push 0
push 0
push 3
mov edx, edi
mov ecx, ebx
call fcn.004114e0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebx - 1]
mov ecx, 6
cmp eax, 0xffe
ja 0x411946
mov eax, dword [esi + 0x20]
add eax, ecx
cmp dword [esi + 0x18], eax
jae 0x411943
push ebx
push edi
push ecx
push str.RFIFOSKIP:_skipped_past_end_of_read_buffer__Adjusting_from__u_to__d__session__d__n
call fcn.00442810
mov eax, dword [ebx*4 + 0x4b5420]
add esp, 0x10
test byte [eax], 1
je 0x41193d
xor ecx, ecx
add dword [esi + 0x20], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
add dword [esi + 0x20], ecx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret