Function at 0x413ad0
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 0x487c1b
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 - 0x22bc], edi
mov esi, ecx
mov eax, dword [esi*4 + 0x4b5420]
mov dword [ebp - 0x22b4], eax
test byte [eax], 1
jne 0x414545
mov edx, dword [eax + 0x18]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x22c0], edx
sub edx, ecx
mov dword [ebp - 0x22ac], ecx
cmp edx, 3
jb 0x414545
test edi, edi
je 0x4144f7
cmp byte [edi], 0
je 0x4144f7
mov eax, dword [eax + 8]
movzx eax, byte [eax + ecx + 2]
mov ecx, 3
mov dword [ebp - 0x22b0], eax
lea eax, [esi - 1]
cmp eax, 0xffe
ja 0x413bbf
mov eax, dword [ebp - 0x22ac]
add eax, ecx
cmp dword [ebp - 0x22c0], eax
jae 0x413bb6
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 0x413bb0
xor ecx, ecx
jmp 0x413bb6
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
mov eax, dword [ebp - 0x22b4]
add dword [eax + 0x20], ecx
xor edi, edi
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
mov edx, dword [ecx + 0x4cf22c]
lea eax, [edx - 1]
cmp eax, 0xffe
ja 0x413bf8
cmp dword [edx*4 + 0x4b5420], 0
je 0x413bf8
mov eax, dword [ecx + 0x4cf23c]
cmp eax, dword [ecx + 0x4cf240]
jne 0x413c01
add ecx, 0x1c
inc edi
cmp ecx, 0x38
jb 0x413bd0
cmp edi, 2
mov edi, dword [ebp - 0x22bc]
jne 0x413c1d
mov ecx, esi
call fcn.00413930
mov eax, 1
jmp 0x414547
push dword [ebp - 0x22b0]
push dword [edi + 4]
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 0x4143f4
mov eax, dword [0x4ad1b4]
mov dword [ebp - 0x22ac], eax
test eax, eax
je 0x4143f4
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x4143f4
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov ecx, dword [ebp - 0x22ac]
mov dword [ecx + 0x3e4], eax
test eax, eax
je 0x4143e0
push dword [ecx + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov ecx, dword [ebp - 0x22ac]
mov dword [ecx + 0x3e8], eax
mov eax, dword [0x4ad1b4]
mov dword [ebp - 0x22b4], eax
test eax, eax
je 0x4143f4
cmp dword [eax + 0x3e4], 0
je 0x4143f4
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x413cdf
push eax
call dword [sym.imp.libmysql.dll_mysql_num_fields]
test eax, eax
je 0x413cdf
mov eax, dword [ebp - 0x22b4]
mov eax, dword [eax + 0x3e4]
mov eax, dword [eax]
jmp 0x413ce1
xor eax, eax
push eax
call fcn.0046d2ec
mov dword [ebp - 0x22ac], eax
add esp, 4
mov eax, dword [0x4ad1b4]
mov dword [ebp - 0x22b4], eax
test eax, eax
je 0x413d34
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x413d34
push eax
call dword [sym.imp.libmysql.dll_mysql_free_result]
mov eax, dword [ebp - 0x22b4]
mov dword [eax + 0x3e0], 0
mov dword [eax + 0x3e4], 0
mov dword [eax + 0x3e8], 0
test byte [edi + 0x184], 1
je 0x413daf
test esi, esi
je 0x413d71
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413d71
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 0x414547
mov ecx, dword [ebp - 0x22b0]
mov eax, dword [ebp - 0x22ac]
cmp dword [edi + ecx*4 + 0x14], eax
jne 0x413e63
push 0
call fcn.0046d284
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x22b0]
cmp dword [edi + eax*8 + 0x10c], edx
jl 0x413e5d
jg 0x413deb
cmp dword [edi + eax*8 + 0x108], ecx
jbe 0x413e5d
test esi, esi
je 0x413e1f
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413e1f
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 0x414547
mov eax, dword [ebp - 0x22ac]
push dword [edi + 4]
mov edx, eax
mov ecx, 0xfffffffe
call fcn.00402120
mov ecx, dword [ebp - 0x22ac]
lea edx, [ebp - 0x22a8]
add esp, 4
push 1
call fcn.00406200
add esp, 4
test eax, eax
jne 0x413f13
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 0x22ac]
call fcn.004023e0
test esi, esi
je 0x413ed5
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x413ed5
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 0x414547
push dword [ebp - 0x22ac]
mov edx, 0x4cf740
lea ecx, [ebp - 0x22c4]
call fcn.0040ff20
add esp, 4
mov dword [ebp - 4], 0
cmp dword [0x4a9e1c], 0
je 0x413ffe
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 0x413f73
lea eax, [ecx + 0x10]
push eax
call dword [sym.imp.libmysql.dll_mysql_real_escape_string]
jmp 0x413f79
call dword [sym.imp.libmysql.dll_mysql_escape_string]
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x22b0]
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 0x413ffe
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x413fbe
push 0x415
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x413ff6
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x413fe7
mov byte [edx], 0
push dword [ecx]
push 0x415
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x413ffe
push 0x415
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 - 0x22b0]
push dword [edi + 4]
push str.Selected_char:__Account__d:__d____s__n
call fcn.00442790
mov edx, dword [ebp - 0x22c4]
add esp, 0x10
add edx, 0xee
mov dword [ebp - 0x50], 0
mov ecx, edx
mov dword [ebp - 0x4c], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x60], xmm0
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x414041
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, eax
add esp, 4
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x22b4], ecx
cmp eax, 0x10
jb 0x4140ad
mov edx, dword [ebp - 0x60]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x41409d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414565
push ecx
push edx
call fcn.0045fa95
mov ecx, dword [ebp - 0x22b4]
add esp, 8
test ecx, ecx
jns 0x4140c7
mov ecx, esi
call fcn.00413930
mov dword [ebp - 0x22bc], 0
jmp 0x4143ad
lea eax, [ecx*8]
sub eax, ecx
mov dword [ebp - 0x22b0], eax
mov eax, dword [eax*4 + 0x4cf22c]
cmp eax, 1
jl 0x414275
cmp dword [eax*4 + 0x4b5420], 0
je 0x414275
mov eax, dword [ebp - 0x22c0]
sub esp, 8
mov edx, esp
mov dword [edx], 0
mov dword [edx + 4], 0
test eax, eax
je 0x414114
lock inc dword [eax + 4]
mov edi, dword [ebp - 0x22c4]
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 - 0x22b0], 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 - 0x22ac], 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 - 0x22b0]
add esp, 0xc
mov dword [ebp - 0x22b8], esi
mov dword [ebp - 0x22b4], eax
mov edx, dword [ebp - 0x22bc]
mov byte [ebp - 4], 1
push esi
mov eax, dword [edx + 4]
mov dword [esi], eax
mov eax, dword [ebp - 0x22c4]
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 - 0x22ac]
lock inc dword [ecx]
mov edi, dword [eax + 4]
mov ecx, dword [ebp - 0x22b0]
mov dword [eax], esi
or esi, 0xffffffff
mov dword [eax + 4], ecx
test edi, edi
je 0x414217
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x414217
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, esi
lock xadd dword [edi + 8], eax
jne 0x414217
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [ebp - 0x22ac]
mov eax, esi
lock xadd dword [ecx], eax
jne 0x414243
mov edi, dword [ebp - 0x22b0]
mov ecx, edi
mov eax, dword [edi]
call dword [eax]
mov eax, esi
lea ecx, [edi + 8]
lock xadd dword [ecx], eax
jne 0x414243
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edi, dword [ebp - 0x22c0]
test edi, edi
je 0x41426b
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x41426b
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x41426b
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, 1
jmp 0x414547
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 - 0x22b4], eax
cmp eax, ecx
je 0x41431f
mov ecx, eax
call fcn.0040fd60
mov eax, dword [ebp - 0x22b4]
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 0x41436f
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x41436f
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 edx, 3
mov eax, dword [esi*4 + 0x4b5420]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0xc]
mov byte [ecx + eax + 2], 1
mov ecx, esi
call fcn.004403f0
mov dword [ebp - 0x22bc], 1
mov esi, dword [ebp - 0x22c0]
test esi, esi
je 0x4143d5
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x4143d5
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x4143d5
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov eax, dword [ebp - 0x22bc]
jmp 0x414547
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 0x41440f
push 0x3ee
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x414447
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x414438
mov byte [edx], 0
push dword [ecx]
push 0x3ee
push str.D:_ragnarokbr_rathena_srccharchar_clif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x41444f
push 0x3ee
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 0x414488
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x414488
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 0x4144bc
mov ecx, dword [esi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 3
cmp eax, dword [ecx + 0x14]
jbe 0x4144bc
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 0x414547
lea eax, [esi - 1]
mov ecx, 3
cmp eax, 0xffe
ja 0x414545
mov eax, dword [ebp - 0x22ac]
add eax, ecx
cmp dword [ebp - 0x22c0], eax
jae 0x41453c
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 0x414536
xor ecx, ecx
jmp 0x41453c
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
mov eax, dword [ebp - 0x22b4]
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