Function at 0x41cb20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi*4 + 0x4b5420]
test byte [esi], 1
jne 0x41d0e7
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x20]
sub edx, ecx
cmp edx, 0x22
jb 0x41d0e7
mov eax, dword [esi + 8]
mov ebx, dword [eax + ecx + 6]
mov dword [ebp - 0x54], ebx
lea ebx, [eax + 0xa]
add ebx, ecx
lea eax, [edi - 1]
mov ecx, 0x22
cmp eax, 0xffe
ja 0x41cba7
mov eax, dword [esi + 0x20]
add eax, ecx
cmp dword [esi + 0x18], eax
jae 0x41cba4
push edi
push edx
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 [edi*4 + 0x4b5420]
add esp, 0x10
test byte [eax], 1
je 0x41cb9e
xor ecx, ecx
jmp 0x41cba4
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
add dword [esi + 0x20], ecx
push 0x18
push ebx
call fcn.0046d32b
mov ecx, dword [0x4ad1b4]
add esp, 8
push eax
lea eax, [ebp - 0x38]
push ebx
push eax
test ecx, ecx
je 0x41cbce
lea eax, [ecx + 0x10]
push eax
call dword [sym.imp.libmysql.dll_mysql_real_escape_string]
jmp 0x41cbd4
call dword [sym.imp.libmysql.dll_mysql_escape_string]
lea eax, [ebp - 0x38]
push eax
push 0x4aaab4
push str.SELECT__account_id___char_id___unban_time__FROM___s__WHERE__name____s
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41cc9a
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x41cc30
push 0x4ae
push str.D:_ragnarokbr_rathena_srccharchar_mapif.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 ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x41cc6d
mov byte [edx], 0
push dword [ecx]
push 0x4ae
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
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 0x4ae
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
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 eax, dword [0x4ad1b4]
test eax, eax
je 0x41d0d1
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x41d0d1
push eax
call dword [sym.imp.libmysql.dll_mysql_num_rows]
or eax, edx
je 0x41d0d1
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41d047
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41d043
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x41d029
push dword [esi + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
push 0
mov dword [esi + 0x3e8], eax
call fcn.0046d284
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], edx
call fcn.0043df80
mov edi, dword [0x4ad1b4]
mov esi, eax
test edi, edi
je 0x41cd54
cmp dword [edi + 0x3e4], 0
je 0x41cd54
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x41cd50
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x41cd50
mov eax, dword [edi + 0x3e4]
mov edi, dword [eax]
jmp 0x41cd57
xor edi, edi
jmp 0x41cd57
mov edi, dword [ebp - 0x64]
push edi
call fcn.0046d2ec
mov ebx, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0x50], eax
test ebx, ebx
je 0x41cd99
cmp dword [ebx + 0x3e4], 0
je 0x41cd99
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x41cd97
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 1
jbe 0x41cd97
mov eax, dword [ebx + 0x3e4]
mov edi, dword [eax + 4]
jmp 0x41cd99
xor edi, edi
push edi
call fcn.0046d2ec
mov ebx, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0x4c], eax
test ebx, ebx
je 0x41cddb
cmp dword [ebx + 0x3e4], 0
je 0x41cddb
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x41cdd9
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
cmp eax, 2
jbe 0x41cdd9
mov eax, dword [ebx + 0x3e4]
mov edi, dword [eax + 8]
jmp 0x41cddb
xor edi, edi
push edi
call fcn.0046d2ec
mov ebx, dword [0x4ad1b4]
add esp, 4
cdq
mov ecx, eax
mov edi, edx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], edi
test ebx, ebx
je 0x41ce2e
mov eax, dword [ebx + 0x3e0]
test eax, eax
je 0x41ce2e
push eax
call dword [sym.imp.libmysql.dll_mysql_free_result]
mov dword [ebx + 0x3e0], 0
mov dword [ebx + 0x3e4], 0
mov dword [ebx + 0x3e8], 0
mov edi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x54]
test edx, edx
jns 0x41ce3f
mov eax, ecx
or eax, edi
je 0x41d0d1
mov eax, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x44]
cmp edi, eax
jg 0x41ce53
jl 0x41ce4f
cmp ecx, ebx
jae 0x41ce53
mov ecx, ebx
mov edi, eax
mov eax, edx
cdq
add ecx, eax
mov dword [ebp - 0x40], ecx
adc edi, edx
mov dword [ebp - 0x3c], edi
cmp edi, dword [ebp - 0x48]
jg 0x41ce73
jl 0x41ce6b
cmp ecx, ebx
jae 0x41ce73
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
push 0x4aaab4
push str.UPDATE___s__SET__unban_time_____WHERE__char_id_____LIMIT_1
push esi
call fcn.0043e040
add esp, 0xc
test eax, eax
jne 0x41cf9c
push 8
lea eax, [ebp - 0x40]
xor edx, edx
push eax
push 0xc
mov ecx, esi
call fcn.0043e1d0
add esp, 0xc
test eax, eax
jne 0x41cf9c
push 4
lea eax, [ebp - 0x4c]
mov edx, 1
push eax
push 0xb
mov ecx, esi
call fcn.0043e1d0
add esp, 0xc
test eax, eax
jne 0x41cf9c
mov ecx, esi
call fcn.0043e300
test eax, eax
jne 0x41cf9c
mov ecx, esi
call fcn.0043e860
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x3c], eax
jl 0x41cf86
mov ecx, dword [ebp - 0x40]
jg 0x41cef8
cmp ecx, ebx
jbe 0x41cf86
mov eax, 0x2b14
mov dword [ebp - 0x59], ecx
mov word [ebp - 0x60], ax
lea ecx, [ebp - 0x60]
mov eax, dword [ebp - 0x4c]
mov edx, 0xb
mov dword [ebp - 0x5e], eax
mov byte [ebp - 0x5a], 2
call fcn.004190a0
mov edx, dword [0x4b9420]
xor esi, esi
test edx, edx
jle 0x41cf86
mov edi, dword [ebp - 0x50]
nop word [eax + eax]
mov ecx, dword [esi*4 + 0x4b5420]
test ecx, ecx
je 0x41cf47
mov eax, dword [ecx + 0x44]
test eax, eax
je 0x41cf47
cmp dword [eax + 4], edi
je 0x41cf62
inc esi
cmp esi, edx
jl 0x41cf30
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
cmp esi, edx
jge 0x41cf86
lea eax, [esi - 1]
cmp eax, 0xffe
ja 0x41cf86
test byte [ecx], 1
jne 0x41cf86
mov ecx, esi
call fcn.004416b0
mov ecx, dword [esi*4 + 0x4b5420]
or byte [ecx], 1
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
test esi, esi
jne 0x41cfb1
push 0x4d1
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____self_is_NULL_n
jmp 0x41d004
mov ecx, dword [esi + 4]
mov eax, ecx
sub eax, dword [esi]
test eax, eax
jle 0x41cff5
mov byte [ecx], 0
push dword [esi]
push 0x4d1
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
mov ecx, esi
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 0x4d1
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov ecx, esi
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
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
jne 0x41d058
push 0x4b3
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x41d090
mov ecx, dword [esi + 4]
mov eax, ecx
sub eax, dword [esi]
test eax, eax
jle 0x41d081
mov byte [ecx], 0
push dword [esi]
push 0x4b3
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x41d098
push 0x4b3
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41d0d1
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41d0d1
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 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