Function at 0x412d80
Capabilities:
Reference sql statements

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x487bcb
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x22d0
call fcn.004874e0
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x22c4], edi
mov esi, ecx
mov eax, dword [esi*4 + 0x4b5420]
mov dword [ebp - 0x22bc], eax
test byte [eax], 1
jne 0x413900
mov edx, dword [eax + 0x18]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x22b4], edx
sub edx, ecx
mov dword [ebp - 0x22ac], ecx
cmp edx, 4
jb 0x413900
test edi, edi
je 0x4138b2
cmp byte [edi], 0
je 0x4138b2
mov eax, dword [eax + 8]
mov eax, dword [ecx + eax]
mov ecx, 4
mov dword [ebp - 0x22b0], eax
lea eax, [esi - 1]
cmp eax, 0xffe
ja 0x412e6d
mov eax, dword [ebp - 0x22ac]
add eax, ecx
cmp dword [ebp - 0x22b4], eax
jae 0x412e64
push esi
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 [esi*4 + 0x4b5420]
add esp, 0x10
test byte [eax], 1
je 0x412e5e
xor ecx, ecx
jmp 0x412e64
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
mov eax, dword [ebp - 0x22bc]
add dword [eax + 0x20], ecx
movsx eax, byte [ebp - 0x22ae]
push eax
push dword [edi + 4]
mov dword [ebp - 0x22ac], eax
push 0x4aaab4
push str.SELECT__char_id__FROM___s__WHERE__account_id__d_AND__char_num__d_AND__delete_date___0
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x14
test eax, eax
jne 0x4137af
mov eax, dword [0x4ad1b4]
mov dword [ebp - 0x22b4], eax
test eax, eax
je 0x4137af
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x4137af
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov ecx, dword [ebp - 0x22b4]
mov dword [ecx + 0x3e4], eax
test eax, eax
je 0x41379b
push dword [ecx + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov ecx, dword [ebp - 0x22b4]
mov dword [ecx + 0x3e8], eax
mov eax, dword [0x4ad1b4]
mov dword [ebp - 0x22bc], eax
test eax, eax
je 0x4137af
cmp dword [eax + 0x3e4], 0
je 0x4137af
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x412f37
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x412f37
mov eax, dword [ebp - 0x22bc]
mov eax, dword [eax + 0x3e4]
mov eax, dword [eax]
jmp 0x412f39
xor eax, eax
push eax
call fcn.0046d2ec
mov dword [ebp - 0x22b4], eax
add esp, 4
mov eax, dword [0x4ad1b4]
mov dword [ebp - 0x22bc], eax
test eax, eax
je 0x412f8c
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x412f8c
push eax
call dword [sym.imp.libmysql.dll_mysql_free_result]
mov eax, dword [ebp - 0x22bc]
mov dword [eax + 0x3e0], 0
mov dword [eax + 0x3e4], 0
mov dword [eax + 0x3e8], 0
test byte [edi + 0x184], 1
je 0x413007
test esi, esi
je 0x412fc9
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x412fc9
push str.chclif_reject
push 0x5dc
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
mov edx, 3
mov ecx, esi
call fcn.00440270
add esp, 0xc
mov eax, dword [esi*4 + 0x4b5420]
mov edx, 0x6c
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov word [ecx + eax], dx
mov edx, 3
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 0
mov ecx, esi
call fcn.004403f0
mov eax, 1
jmp 0x413902
mov eax, dword [ebp - 0x22ac]
mov ecx, dword [ebp - 0x22b4]
cmp dword [edi + eax*4 + 0x14], ecx
jne 0x4130b5
push 0
call fcn.0046d284
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x22ac]
cmp dword [edi + eax*8 + 0x10c], edx
jl 0x4130b5
jg 0x413043
cmp dword [edi + eax*8 + 0x108], ecx
jbe 0x4130b5
test esi, esi
je 0x413077
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413077
push str.chclif_reject
push 0x5dc
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
mov edx, 3
mov ecx, esi
call fcn.00440270
add esp, 0xc
mov eax, dword [esi*4 + 0x4b5420]
mov edx, 0x6c
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov word [ecx + eax], dx
mov edx, 3
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 0
mov ecx, esi
call fcn.004403f0
mov eax, 1
jmp 0x413902
push dword [edi + 4]
mov edx, dword [ebp - 0x22b4]
mov ecx, 0xfffffffe
call fcn.00402120
mov ecx, dword [ebp - 0x22b4]
lea edx, [ebp - 0x22a8]
add esp, 4
push 1
call fcn.00406200
add esp, 4
test eax, eax
jne 0x413169
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 0x22b4]
call fcn.004023e0
test esi, esi
je 0x41312b
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x41312b
push str.chclif_reject
push 0x5dc
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
mov edx, 3
mov ecx, esi
call fcn.00440270
add esp, 0xc
mov eax, dword [esi*4 + 0x4b5420]
mov edx, 0x6c
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov word [ecx + eax], dx
mov edx, 3
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 0
mov ecx, esi
call fcn.004403f0
mov eax, 1
jmp 0x413902
push dword [ebp - 0x22b4]
mov edx, 0x4cf740
lea ecx, [ebp - 0x22b8]
call fcn.0040ff20
add esp, 4
mov dword [ebp - 4], 0
cmp dword [0x4a9e1c], 0
je 0x413254
lea eax, [ebp - 0x21ff]
push 0x18
push eax
call fcn.0046d32b
mov ecx, dword [0x4ad1b4]
add esp, 8
push eax
lea eax, [ebp - 0x21ff]
push eax
lea eax, [ebp - 0x48]
push eax
test ecx, ecx
je 0x4131c9
lea eax, [ecx + 0x10]
push eax
call dword [sym.imp.libmysql.dll_mysql_real_escape_string]
jmp 0x4131cf
call dword [sym.imp.libmysql.dll_mysql_escape_string]
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x22ac]
push dword [edi + 4]
push 0x4aafb4
push str.INSERT_INTO___s___time____account_id___char_num___name___VALUES__NOW_____d___d___s_
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x18
cmp eax, 0xffffffff
jne 0x413254
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x413214
push 0x374
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x41324c
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x41323d
mov byte [edx], 0
push dword [ecx]
push 0x374
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x413254
push 0x374
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
lea eax, [ebp - 0x21ff]
push eax
push dword [ebp - 0x22ac]
push dword [edi + 4]
push str.Selected_char:__Account__d:__d____s__n
call fcn.00442790
mov edx, dword [ebp - 0x22b8]
add esp, 0x10
add edx, 0xee
mov dword [ebp - 0x50], 0
mov ecx, edx
mov dword [ebp - 0x22ac], edx
xorps xmm0, xmm0
mov dword [ebp - 0x4c], 0
movups xmmword [ebp - 0x60], xmm0
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4132a0
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x60]
call fcn.00416480
or edi, 0xffffffff
lea ecx, [ebp - 0x60]
push 0xffff
mov edx, edi
call fcn.0040ab20
mov ecx, dword [ebp - 0x4c]
add esp, 4
mov dword [ebp - 0x22bc], eax
cmp ecx, 0x10
jb 0x413308
mov edx, dword [ebp - 0x60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4132f8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413920
push ecx
push edx
call fcn.0045fa95
mov eax, dword [ebp - 0x22bc]
add esp, 8
test eax, eax
jns 0x413451
mov ecx, dword [0x4cf268]
mov eax, 0x66666667
sub ecx, dword [0x4cf264]
imul ecx
movsx ecx, byte [ebp - 0x22ad]
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x413451
lea eax, [ecx + ecx*4]
mov edx, 0xf
mov ecx, dword [0x4cf264]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x22b0], eax
mov eax, dword [ebp - 0x22ac]
mov ecx, eax
mov byte [eax + 0xf], 0
mov eax, dword [ebp - 0x22b0]
sub eax, ecx
mov dword [ebp - 0x22bc], eax
nop dword [eax]
mov al, byte [eax + ecx]
dec edx
mov byte [ecx], al
inc ecx
test al, al
je 0x413387
mov eax, dword [ebp - 0x22bc]
test edx, edx
jne 0x413370
jmp 0x413397
test edx, edx
je 0x413397
push edx
push 0
push ecx
call fcn.00461440
add esp, 0xc
mov ecx, dword [ebp - 0x22b0]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x22b8]
movups xmmword [ebp - 0x60], xmm0
mov dword [ebp - 0x50], 0
movzx eax, word [ecx + 0x10]
mov word [edx + 0xfe], ax
movzx eax, word [ecx + 0x12]
mov word [edx + 0x100], ax
mov edx, dword [ebp - 0x22ac]
mov ecx, edx
mov dword [ebp - 0x4c], 0
lea eax, [ecx + 1]
mov dword [ebp - 0x22bc], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4133e0
sub ecx, dword [ebp - 0x22bc]
push ecx
push edx
lea ecx, [ebp - 0x60]
call fcn.00416480
push 0xffff
mov edx, edi
lea ecx, [ebp - 0x60]
call fcn.0040ab20
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x22bc], ecx
cmp eax, 0x10
jb 0x41344d
mov edx, dword [ebp - 0x60]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x41343d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413920
push ecx
push edx
call fcn.0045fa95
mov ecx, dword [ebp - 0x22bc]
add esp, 8
test ecx, ecx
jns 0x4134b2
test esi, esi
je 0x413485
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413485
push str.chclif_reject
push 0x5dc
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
mov edx, 3
mov ecx, esi
call fcn.00440270
add esp, 0xc
mov eax, dword [esi*4 + 0x4b5420]
mov edx, 0x6c
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov word [ecx + eax], dx
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 0
jmp 0x41375d
lea eax, [ecx*8]
sub eax, ecx
mov dword [ebp - 0x22b0], eax
mov eax, dword [eax*4 + 0x4cf22c]
cmp eax, 1
jl 0x41363b
cmp dword [eax*4 + 0x4b5420], 0
je 0x41363b
mov eax, dword [ebp - 0x22b4]
sub esp, 8
mov edx, esp
mov dword [edx], 0
mov dword [edx + 4], 0
test eax, eax
je 0x4134ff
lock inc dword [eax + 4]
mov edi, dword [ebp - 0x22b8]
mov dword [edx], edi
mov edi, dword [ebx + 8]
mov dword [edx + 4], eax
mov edx, edi
push ecx
mov ecx, esi
call fcn.00412b20
add esp, 0xc
push 0x40
call fcn.0045f6ff
add esp, 4
mov dword [ebp - 0x22ac], eax
xorps xmm0, xmm0
movq qword [eax], xmm0
lea ecx, [eax + 4]
push 0x30
mov dword [eax + 8], 0
lea esi, [eax + 0x10]
push 0
push esi
mov dword [ebp - 0x22b0], ecx
mov dword [ecx], 1
mov dword [eax + 8], 1
mov dword [eax], vtable.std::_Ref_count_obj2_struct_auth_node_.0
call fcn.00461440
mov eax, dword [ebp - 0x22ac]
add esp, 0xc
mov dword [ebp - 0x22c0], esi
mov dword [ebp - 0x22bc], eax
mov edx, dword [ebp - 0x22c4]
mov byte [ebp - 4], 1
push esi
mov eax, dword [edx + 4]
mov dword [esi], eax
mov eax, dword [ebp - 0x22b8]
mov eax, dword [eax]
mov dword [esi + 4], eax
mov eax, dword [edx + 8]
mov dword [esi + 8], eax
mov eax, dword [edx + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [edx + 0x78]
mov ecx, dword [edx + 0x7c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov ecx, 0x4cf720
mov eax, dword [edx + 0x80]
mov dword [esi + 0x20], eax
mov dword [esi + 0x10], edi
call fcn.00415ca0
mov ecx, dword [ebp - 0x22b0]
lock inc dword [ecx]
mov ecx, dword [ebp - 0x22ac]
or edi, 0xffffffff
mov dword [eax], esi
mov esi, dword [eax + 4]
mov dword [eax + 4], ecx
test esi, esi
je 0x413602
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x413602
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x413602
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0x22b0]
mov eax, edi
lock xadd dword [ecx], eax
jne 0x413769
mov esi, dword [ebp - 0x22ac]
mov ecx, esi
mov eax, dword [esi]
call dword [eax]
mov eax, edi
lea ecx, [esi + 8]
lock xadd dword [ecx], eax
jne 0x413769
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
jmp 0x413769
push ecx
push eax
push str.parse_char:_Attempting_to_write_to_invalid_session__d__Map_Server__d_disconnected._n
call fcn.00442810
mov ecx, dword [ebp - 0x22b0]
xorps xmm1, xmm1
pextrw eax, xmm1, 4
xorps xmm0, xmm0
mov dword [ebp - 0x22d0], 0
movups xmmword [ebp - 0x22e0], xmm1
add esp, 0xc
mov dword [ebp - 0x22cc], 0
movd dword [ecx*4 + 0x4cf22c], xmm1
psrldq xmm0, 4
mov word [ecx*4 + 0x4cf234], ax
lea eax, [ecx*4 + 0x4cf23c]
psrldq xmm1, 0xc
movd dword [ecx*4 + 0x4cf230], xmm0
movd dword [ecx*4 + 0x4cf238], xmm1
lea ecx, [ebp - 0x22d0]
mov dword [ebp - 0x22c8], 0
mov dword [ebp - 0x22c4], eax
cmp eax, ecx
je 0x4136e5
mov ecx, eax
call fcn.0040fd60
mov eax, dword [ebp - 0x22c4]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
lea ecx, [ebp - 0x22d0]
call fcn.0040fd60
mov eax, dword [ebp - 0x22b0]
mov dword [eax*4 + 0x4cf22c], 0xffffffff
test esi, esi
je 0x413735
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413735
push str.chclif_send_auth_result
push 0x1b4
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
mov edx, 3
mov ecx, esi
call fcn.00440270
add esp, 0xc
mov eax, dword [esi*4 + 0x4b5420]
mov edx, 0x81
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov word [ecx + eax], dx
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 1
mov edx, 3
mov ecx, esi
call fcn.004403f0
mov esi, dword [ebp - 0x22b4]
test esi, esi
je 0x413791
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x413791
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x413791
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, 1
jmp 0x413902
lea eax, [ecx + 0x10]
mov dword [ecx + 0x3e8], 0
push eax
call dword [sym.imp.libmysql.dll_mysql_errno]
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x4137ca
push 0x349
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x413802
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x4137f3
mov byte [edx], 0
push dword [ecx]
push 0x349
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x41380a
push 0x349
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov edi, dword [0x4ad1b4]
test edi, edi
je 0x413843
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x413843
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
test esi, esi
je 0x413877
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413877
push str.chclif_reject
push 0x5dc
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
mov edx, 3
mov ecx, esi
call fcn.00440270
add esp, 0xc
mov eax, dword [esi*4 + 0x4b5420]
mov edx, 0x6c
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov word [ecx + eax], dx
mov edx, 3
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 0
mov ecx, esi
call fcn.004403f0
mov eax, 1
jmp 0x413902
lea eax, [esi - 1]
mov ecx, 4
cmp eax, 0xffe
ja 0x413900
mov eax, dword [ebp - 0x22ac]
add eax, ecx
cmp dword [ebp - 0x22b4], eax
jae 0x4138f7
push esi
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 [esi*4 + 0x4b5420]
add esp, 0x10
test byte [eax], 1
je 0x4138f1
xor ecx, ecx
jmp 0x4138f7
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
mov eax, dword [ebp - 0x22bc]
add dword [eax + 0x20], ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00472358
int3