Function at 0x407bd0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x240], ecx
call fcn.00444cc0
movsx ecx, word [0x4a9ef0]
mov esi, 0x17
cdq
idiv ecx
lea ecx, [ebp - 0x20]
mov byte [ebp - 9], 0
mov eax, ecx
mov dword [ebp - 0x250], edx
sub edi, eax
mov al, byte [edi + ecx]
dec esi
mov byte [ecx], al
inc ecx
test al, al
je 0x407c24
test esi, esi
jne 0x407c13
jmp 0x407c34
test esi, esi
je 0x407c34
push esi
push 0
push ecx
call fcn.00461440
add esp, 0xc
mov edx, 0x494c54
lea ecx, [ebp - 0x20]
call fcn.00442970
lea eax, [ebp - 0x20]
push 0x18
push eax
call fcn.0046d32b
mov ecx, dword [0x4ad1b4]
add esp, 8
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x54]
push eax
test ecx, ecx
je 0x407c6e
lea eax, [ecx + 0x10]
push eax
call dword [sym.imp.libmysql.dll_mysql_real_escape_string]
jmp 0x407c74
call dword [sym.imp.libmysql.dll_mysql_escape_string]
mov ecx, 0x19
lea edi, [ebp - 0xbc]
mov esi, 0x4a9e28
lea edx, [ebp - 0x54]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x60
lea edi, [ebp - 0x23c]
mov esi, 0x4a9ef4
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x20]
call fcn.00407990
test eax, eax
js 0x4081b1
mov ebx, dword [ebp + 0x20]
test ebx, ebx
js 0x4081ac
mov edx, dword [ebp - 0x240]
movzx eax, byte [edx + 0x84]
cmp ebx, eax
jge 0x4081ac
mov ecx, dword [ebp + 0x30]
mov eax, ecx
sub eax, 0
je 0x407d0a
sub eax, 1
je 0x407cfe
push ecx
push str.Received_unsupported_gender__d..._n
call fcn.004427d0
add esp, 8
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x244], 0x4d
jmp 0x407d14
mov dword [ebp - 0x244], 0x46
push dword [edx + 4]
mov eax, dword [0x4aa1f4]
push 0x4aaab4
push str.SELECT_1_FROM___s__WHERE__account_id____d
push dword [0x4ad1b4]
mov dword [ebp - 0x254], eax
call fcn.0043d8e0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x407d9a
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x407d5a
push 0x5ca
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x407d92
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x407d83
mov byte [edx], 0
push dword [ecx]
push 0x5ca
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x407d9a
push 0x5ca
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov ecx, dword [0x4ad1b4]
test ecx, ecx
je 0x407dc1
mov eax, dword [ecx + 0x3e0]
test eax, eax
je 0x407dc1
push eax
call dword [sym.imp.libmysql.dll_mysql_num_rows]
mov ecx, dword [0x4ad1b4]
mov esi, eax
mov edi, edx
jmp 0x407dd8
xorps xmm0, xmm0
movlpd qword [ebp - 0x24c], xmm0
mov edi, dword [ebp - 0x248]
mov esi, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x240]
movzx eax, byte [eax + 0x84]
cdq
cmp edi, edx
ja 0x408005
jb 0x407df8
cmp esi, eax
jae 0x408005
mov esi, dword [ebp - 0x240]
push ebx
push dword [esi + 4]
push 0x4aaab4
push str.SELECT_1_FROM___s__WHERE__account_id____d_AND__char_num____d_LIMIT_1
push ecx
call fcn.0043d8e0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x407e75
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x407e35
push 0x5d5
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x407e6d
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x407e5e
mov byte [edx], 0
push dword [ecx]
push 0x5d5
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x407e75
push 0x5d5
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov eax, dword [0x4ad1b4]
test eax, eax
je 0x407ea1
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x407ea1
push eax
call dword [sym.imp.libmysql.dll_mysql_num_rows]
test edx, edx
ja 0x408005
jb 0x407ea1
test eax, eax
jne 0x408005
cmp dword [0x4a9e1c], 0
je 0x407f45
push dword [ebp + 0x24]
lea eax, [ebp - 0x54]
push dword [ebp + 0x28]
push 1
push 1
push 1
push 1
push 1
push 1
push eax
push ebx
push dword [esi + 4]
push str.make_new_char
push 0x4aafb4
push str.INSERT_INTO___s____time____char_msg___account_id___char_num___name___str___agi___vit___int___dex___luk___hair___hair_color__VALUES__NOW_____s___d___d___s___d___d___d___d___d___d___d___d_
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x3c
cmp eax, 0xffffffff
jne 0x407f45
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x407f05
push 0x5de
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x407f3d
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x407f2e
mov byte [edx], 0
push dword [ecx]
push 0x5de
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x407f45
push 0x5de
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov bx, word [ebp + 0x2c]
test bx, bx
jne 0x40801b
test byte [0x4aa224], 1
je 0x408005
mov eax, dword [ebp - 0x250]
push dword [ebp - 0x244]
lea eax, [eax + eax*4]
movzx ecx, word [ebp + eax*4 - 0xaa]
movzx edx, word [ebp + eax*4 - 0xac]
lea eax, [ebp + eax*4 - 0xbc]
push ecx
push edx
push eax
push ecx
push edx
push eax
push dword [ebp + 0x24]
movsx eax, bx
push dword [ebp + 0x28]
push 0xb
push 0xb
push 0x28
push 0x28
push 1
push 1
push 1
push 1
push 1
push 1
push dword [ebp - 0x254]
push dword [0x4aa208]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0x20]
push dword [esi + 4]
push 0x4aaab4
push str.INSERT_INTO___s____account_id____char_num____name____class____zeny____status_point____str____agi____vit____int____dex____luk____max_hp____hp___max_sp____sp____hair____hair_color____last_map____last_x____last_y____save_map____save_x____save_y____sex____last_instanceid___VALUES___d___d___s___d___d____d___d___d___d___d___d___d___u___u___u___u___d___d___s___d___d___s___d___d___c__0_
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x70
cmp eax, 0xffffffff
jne 0x4080ae
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x40806e
push 0x5f8
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov eax, 0x107a
cmp bx, ax
jne 0x408005
test byte [0x4aa224], 2
je 0x408005
mov ecx, 0x19
lea edi, [ebp - 0xbc]
mov esi, 0x4a9e8c
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x60
lea edi, [ebp - 0x23c]
mov esi, 0x4aa074
rep movsd dword es:[edi], dword [esi]
call fcn.00444cc0
movsx ecx, word [0x4a9ef2]
cdq
idiv ecx
mov esi, dword [ebp - 0x240]
mov eax, edx
jmp 0x407f65
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x40809a
mov byte [edx], 0
push dword [ecx]
push 0x5f8
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x408005
push 0x5f8
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
jmp 0x407ffd
mov eax, dword [0x4ad1b4]
test eax, eax
je 0x4080c5
add eax, 0x10
push eax
call dword [sym.imp.libmysql.dll_mysql_insert_id]
mov ebx, eax
jmp 0x4080d6
xorps xmm0, xmm0
movlpd qword [ebp - 0x24c], xmm0
mov ebx, dword [ebp - 0x24c]
xor edi, edi
lea esi, [ebp - 0x234]
nop
mov ecx, dword [esi - 8]
test ecx, ecx
je 0x40817b
movzx eax, word [esi - 4]
push 1
push dword [esi]
push eax
push ecx
push ebx
push 0x4aaeb4
push str.INSERT_INTO___s____char_id___nameid____amount____equip____identify___VALUES___d___u___hu___u___d_
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x20
cmp eax, 0xffffffff
jne 0x40816e
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x40812e
push 0x601
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu___self_is_NULL_n
jmp 0x408166
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x408157
mov byte [edx], 0
push dword [ecx]
push 0x601
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x40816e
push 0x601
push str.D:_ragnarokbr_rathena_srccharchar.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
inc edi
add esi, 0xc
cmp edi, 0x20
jle 0x4080e0
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x20]
mov eax, dword [ebp - 0x240]
push ebx
push dword [eax + 4]
push str.Created_char:_account:__d__char:__d__slot:__d__name:__s_n
call fcn.00442790
add esp, 0x14
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffc
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045f6f1
mov esp, ebp
pop ebp
ret