Function at 0x41d100
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x438], edi
mov ecx, dword [edi*4 + 0x4b5420]
test byte [ecx], 1
jne 0x41d577
mov eax, dword [ecx + 0x18]
mov edx, dword [ecx + 0x20]
sub eax, edx
cmp eax, 6
jb 0x41d577
mov eax, dword [ecx + 8]
mov eax, dword [eax + edx + 2]
mov dword [ebp - 0x434], eax
call fcn.0043df80
lea ecx, [edi - 1]
mov ebx, eax
mov edx, 6
cmp ecx, 0xffe
ja 0x41d1b3
cmp dword [edi*4 + 0x4b5420], 0
je 0x41d1b3
mov ecx, dword [edi*4 + 0x4b5420]
test byte [ecx], 1
jne 0x41d1b3
mov esi, ecx
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
add eax, edx
cmp ecx, eax
jae 0x41d1b0
sub ecx, dword [esi + 0x20]
push edi
push ecx
push edx
push str.RFIFOSKIP:_skipped_past_end_of_read_buffer__Adjusting_from__u_to__d__session__d__n
call fcn.00442810
mov eax, dword [edi*4 + 0x4b5420]
add esp, 0x10
test byte [eax], 1
je 0x41d1aa
xor edx, edx
jmp 0x41d1b0
mov edx, dword [eax + 0x18]
sub edx, dword [eax + 0x20]
add dword [esi + 0x20], edx
push 0x32
push dword [ebp - 0x434]
push 0x4ac9b4
push str.SELECT__script____tick____flag____type____icon__FROM___s__WHERE__char_id____d_LIMIT__d
push ebx
call fcn.0043e040
add esp, 0x14
cmp eax, 0xffffffff
je 0x41d4ea
mov ecx, ebx
call fcn.0043e300
cmp eax, 0xffffffff
je 0x41d4ea
sub esp, 8
lea eax, [ebp - 0x218]
xor edx, edx
mov ecx, ebx
push 0x200
push eax
push 0x15
call fcn.0043e410
add esp, 0x14
cmp eax, 0xffffffff
je 0x41d4ea
sub esp, 8
lea eax, [ebp - 0x18]
mov edx, 1
mov ecx, ebx
push 0
push eax
push 4
call fcn.0043e410
add esp, 0x14
cmp eax, 0xffffffff
je 0x41d4ea
sub esp, 8
lea eax, [ebp - 0x10]
mov edx, 2
mov ecx, ebx
push 0
push eax
push 6
call fcn.0043e410
add esp, 0x14
cmp eax, 0xffffffff
je 0x41d4ea
sub esp, 8
lea eax, [ebp - 0xc]
mov edx, 3
mov ecx, ebx
push 0
push eax
push 5
call fcn.0043e410
add esp, 0x14
cmp eax, 0xffffffff
je 0x41d4ea
sub esp, 8
lea eax, [ebp - 0xe]
mov edx, 4
mov ecx, ebx
push 0
push eax
push 2
call fcn.0043e410
add esp, 0x14
cmp eax, 0xffffffff
je 0x41d4ea
test ebx, ebx
je 0x41d2ae
push dword [ebx + 0xc]
call dword [sym.imp.libmysql.dll_mysql_stmt_num_rows]
mov dword [ebp - 0x43c], edx
jmp 0x41d2bf
xorps xmm0, xmm0
movlpd qword [ebp - 0x440], xmm0
mov eax, dword [ebp - 0x440]
mov dword [ebp - 0x430], eax
test al, al
je 0x41d55a
movzx eax, al
imul esi, eax, 0x210
add esi, 9
mov dword [ebp - 0x43c], esi
test edi, edi
je 0x41d30f
mov ecx, dword [edi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, esi
cmp eax, dword [ecx + 0x14]
jbe 0x41d30f
push str.chmapif_bonus_script_get
push 0x520
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, esi
mov ecx, edi
call fcn.00440270
add esp, 0xc
mov edx, dword [edi*4 + 0x4b5420]
mov edi, 0x2b2f
mov byte [ebp - 0x429], 0
mov ecx, dword [edx + 0x1c]
mov eax, dword [edx + 0xc]
mov word [ecx + eax], di
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov edi, dword [ebp - 0x438]
mov word [ecx + eax + 2], si
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov esi, dword [ebp - 0x434]
mov dword [ecx + eax + 4], esi
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov edx, dword [ebp - 0x430]
mov byte [ecx + eax + 8], dl
nop dword [eax]
mov ecx, ebx
call fcn.0043e610
test eax, eax
jne 0x41d462
push 0x200
push eax
lea eax, [ebp - 0x428]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x228], xmm0
call fcn.00461440
lea eax, [ebp - 0x218]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41d397
sub eax, edx
lea ecx, [eax + 1]
test ecx, ecx
je 0x41d3e4
mov byte [ebp + eax - 0x428], 0
lea edx, [ebp - 0x428]
test eax, eax
je 0x41d3e4
lea esi, [ebp - 0x218]
mov ecx, edx
sub esi, ecx
mov cl, byte [esi + edx]
dec eax
mov byte [edx], cl
inc edx
test cl, cl
je 0x41d3d4
test eax, eax
jne 0x41d3c3
jmp 0x41d3e4
test eax, eax
je 0x41d3e4
push eax
push 0
push edx
call fcn.00461440
add esp, 0xc
mov eax, dword [ebp - 0x18]
lea esi, [ebp - 0x428]
mov ecx, dword [ebp - 0x14]
mov edx, dword [edi*4 + 0x4b5420]
mov dword [ebp - 0x228], eax
movzx eax, word [ebp - 0x10]
mov word [ebp - 0x220], ax
movzx eax, byte [ebp - 0xc]
mov edi, dword [edx + 0xc]
mov byte [ebp - 0x21c], al
movzx eax, word [ebp - 0xe]
mov word [ebp - 0x21e], ax
movzx eax, byte [ebp - 0x429]
mov dword [ebp - 0x224], ecx
imul ecx, eax, 0x210
mov al, byte [ebp - 0x429]
inc al
mov byte [ebp - 0x429], al
add ecx, 9
add ecx, dword [edx + 0x1c]
add edi, ecx
mov ecx, 0x84
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x438]
cmp al, byte [ebp - 0x430]
jb 0x41d360
mov edx, dword [ebp - 0x43c]
mov ecx, edi
call fcn.004403f0
movzx eax, byte [ebp - 0x429]
mov esi, dword [ebp - 0x434]
push eax
push esi
push str.Bonus_Script_loaded_for_CID_d._Total:__d._n
call fcn.00442790
add esp, 0xc
push esi
push 0x4ac9b4
push str.DELETE_FROM___s__WHERE__char_id__d
push ebx
call fcn.0043e040
add esp, 0x10
cmp eax, 0xffffffff
je 0x41d4b4
mov ecx, ebx
call fcn.0043e300
cmp eax, 0xffffffff
jne 0x41d55a
test ebx, ebx
jne 0x41d4cc
push 0x539
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____self_is_NULL_n
jmp 0x41d552
mov ecx, dword [ebx + 4]
mov eax, ecx
sub eax, dword [ebx]
test eax, eax
jle 0x41d4e3
mov byte [ecx], 0
push dword [ebx]
push 0x539
jmp 0x41d514
push 0x539
jmp 0x41d548
test ebx, ebx
jne 0x41d4ff
push 0x517
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____self_is_NULL_n
jmp 0x41d552
mov ecx, dword [ebx + 4]
mov eax, ecx
sub eax, dword [ebx]
test eax, eax
jle 0x41d543
mov byte [ecx], 0
push dword [ebx]
push 0x517
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
mov ecx, ebx
call fcn.0043e860
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
push 0x517
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov ecx, ebx
call fcn.0043e860
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret