Function at 0x41b850
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x4a701c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
push ebx
push esi
push edi
mov esi, dword [eax*4 + 0x4b5420]
mov dword [ebp - 0x4c], eax
test byte [esi], 1
jne 0x41bf48
mov edx, dword [esi + 0x18]
mov edi, dword [esi + 0x20]
sub edx, edi
cmp edx, 0x2c
jb 0x41bf48
mov ecx, dword [esi + 8]
add ecx, edi
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x39], 1
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
mov eax, dword [ecx + 2]
mov dword [ebp - 0x5c], eax
lea eax, [ecx + 6]
mov dword [ebp - 0x40], eax
movzx eax, word [ecx + 0x1e]
mov dword [ebp - 0x60], eax
mov ebx, eax
mov dword [ebp - 0x64], ebx
mov ebx, dword [esi + 0x18]
mov dword [ebp - 0x58], 1
cmp eax, 2
je 0x41b8e1
cmp eax, 6
je 0x41b8e1
cmp eax, 9
jne 0x41b8ed
movzx eax, byte [ecx + 0x20]
mov dword [ebp - 0x58], eax
jmp 0x41b8ed
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0x50], eax
mov eax, dword [ecx + 0x24]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x4c]
mov ecx, 0x2c
dec eax
cmp eax, 0xffe
ja 0x41b930
lea eax, [edi + 0x2c]
cmp ebx, eax
jae 0x41b92d
mov ebx, dword [ebp - 0x4c]
push ebx
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 [ebx*4 + 0x4b5420]
add esp, 0x10
test byte [eax], 1
je 0x41b927
xor ecx, ecx
jmp 0x41b92d
mov ecx, dword [eax + 0x18]
sub ecx, dword [eax + 0x20]
add dword [esi + 0x20], ecx
mov esi, dword [ebp - 0x40]
push 0x18
push esi
call fcn.0046d32b
mov ecx, dword [0x4ad1b4]
add esp, 8
push eax
lea eax, [ebp - 0x38]
push esi
push eax
test ecx, ecx
je 0x41b95a
lea eax, [ecx + 0x10]
push eax
call dword [sym.imp.libmysql.dll_mysql_real_escape_string]
jmp 0x41b960
call dword [sym.imp.libmysql.dll_mysql_escape_string]
lea eax, [ebp - 0x38]
push eax
push 0x4aaab4
push str.SELECT__account_id____char_id__FROM___s__WHERE__name____s
push dword [0x4ad1b4]
call fcn.0043d8e0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41b9ef
mov ecx, dword [0x4ad1b4]
test ecx, ecx
jne 0x41b9a7
push 0x304
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
jmp 0x41bbd5
mov edx, dword [ecx + 4]
mov eax, edx
sub eax, dword [ecx]
test eax, eax
jle 0x41b9d3
mov byte [edx], 0
push dword [ecx]
push 0x304
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
jmp 0x41bbd5
push 0x304
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
jmp 0x41bbd5
mov eax, dword [0x4ad1b4]
test eax, eax
je 0x41beee
mov eax, dword [eax + 0x3e0]
test eax, eax
je 0x41beee
push eax
call dword [sym.imp.libmysql.dll_mysql_num_rows]
or eax, edx
je 0x41beee
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41be75
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41be71
push eax
call dword [sym.imp.libmysql.dll_mysql_fetch_row]
mov dword [esi + 0x3e4], eax
test eax, eax
je 0x41be57
push dword [esi + 0x3e0]
call dword [sym.imp.libmysql.dll_mysql_fetch_lengths]
mov ebx, dword [sym.imp.libmysql.dll_mysql_num_fields]
mov dword [esi + 0x3e8], eax
mov esi, dword [0x4ad1b4]
test esi, esi
je 0x41ba94
cmp dword [esi + 0x3e4], 0
je 0x41ba94
mov eax, dword [esi + 0x3e0]
test eax, eax
je 0x41ba90
push eax
call ebx
test eax, eax
je 0x41ba90
mov eax, dword [esi + 0x3e4]
mov esi, dword [eax]
jmp 0x41ba97
xor esi, esi
jmp 0x41ba97
mov esi, dword [ebp - 0x68]
push esi
call fcn.0046d2ec
mov edi, dword [0x4ad1b4]
add esp, 4
mov dword [ebp - 0x44], eax
test edi, edi
je 0x41bad5
cmp dword [edi + 0x3e4], 0
je 0x41bad5
mov eax, dword [edi + 0x3e0]
test eax, eax
je 0x41bad3
push eax
call ebx
cmp eax, 1
jbe 0x41bad3
mov eax, dword [edi + 0x3e4]
mov esi, dword [eax + 4]
jmp 0x41bad5
xor esi, esi
push esi
call fcn.0046d2ec
mov esi, dword [0x4ad1b4]
add esp, 4
mov ebx, eax
test esi, esi
je 0x41bb19
mov ecx, dword [esi + 0x3e0]
test ecx, ecx
je 0x41bb19
push ecx
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 edi, dword [0x4a7a90]
lea eax, [edi - 1]
cmp eax, 0xffe
ja 0x41be4b
cmp dword [edi*4 + 0x4b5420], 0
je 0x41be4b
mov eax, dword [edi*4 + 0x4b5420]
test byte [eax], 1
jne 0x41be4b
mov eax, dword [ebp - 0x60]
dec eax
cmp eax, 8
ja case.0x41bb54.7
jmp dword [eax*4 + 0x41bf5c]
test edi, edi
je 0x41bb95
mov ecx, dword [edi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 0xa
cmp eax, dword [ecx + 0x14]
jbe 0x41bb95
push str.chmapif_parse_fwlog_changestatus
push 0x31d
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, 0xa
mov ecx, edi
call fcn.00440270
mov edi, dword [0x4a7a90]
add esp, 0xc
mov esi, dword [edi*4 + 0x4b5420]
mov edx, 0x2724
mov ebx, dword [ebp - 0x44]
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
mov word [ecx + eax], dx
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
mov dword [ecx + eax + 2], ebx
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
mov dword [ecx + eax + 6], 5
mov edx, 0xa
mov ecx, edi
call fcn.004403f0
mov esi, dword [ebp - 0x40]
mov bl, byte [ebp - 0x39]
cmp dword [ebp - 0x5c], 0xffffffff
je 0x41bf32
test bl, bl
je 0x41bf32
mov ebx, dword [ebp - 0x4c]
test ebx, ebx
je 0x41bc21
mov ecx, dword [ebx*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 0x22
cmp eax, dword [ecx + 0x14]
jbe 0x41bc21
push str.chmapif_parse_fwlog_changestatus
push 0x34c
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, 0x22
mov ecx, ebx
call fcn.00440270
add esp, 0xc
mov edi, dword [ebx*4 + 0x4b5420]
mov edx, 0x2b0f
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0xc]
mov word [ecx + eax], dx
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x5c]
mov dword [ecx + eax + 2], edx
mov edx, 0x17
mov ecx, dword [edi + 0x1c]
add ecx, 6
add ecx, dword [edi + 0xc]
sub esi, ecx
mov byte [ecx + 0x17], 0
mov al, byte [esi + ecx]
dec edx
mov byte [ecx], al
inc ecx
test al, al
je 0x41befa
test edx, edx
jne 0x41bc58
jmp 0x41bf0a
test edi, edi
je 0x41bcaa
mov ecx, dword [edi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 0xa
cmp eax, dword [ecx + 0x14]
jbe 0x41bcaa
push str.chmapif_parse_fwlog_changestatus
push 0x324
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, 0xa
mov ecx, edi
call fcn.00440270
mov edi, dword [0x4a7a90]
add esp, 0xc
mov edx, dword [edi*4 + 0x4b5420]
mov esi, 0x2725
mov ebx, dword [ebp - 0x44]
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov word [ecx + eax], si
mov ecx, dword [edx + 0x1c]
mov eax, dword [edx + 0xc]
mov dword [ecx + eax + 2], ebx
mov ecx, dword [edx + 0x1c]
mov eax, dword [edx + 0xc]
mov edx, dword [ebp - 0x50]
mov dword [ecx + eax + 6], edx
jmp 0x41bbc6
test edi, edi
je 0x41bd19
mov ecx, dword [edi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 0xa
cmp eax, dword [ecx + 0x14]
jbe 0x41bd19
push str.chmapif_parse_fwlog_changestatus
push 0x32b
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, 0xa
mov ecx, edi
call fcn.00440270
mov edi, dword [0x4a7a90]
add esp, 0xc
mov edx, dword [edi*4 + 0x4b5420]
mov esi, 0x2724
mov ebx, dword [ebp - 0x44]
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov word [ecx + eax], si
mov ecx, dword [edx + 0x1c]
mov eax, dword [edx + 0xc]
mov dword [ecx + eax + 2], ebx
mov ecx, dword [edx + 0x1c]
mov eax, dword [edx + 0xc]
mov dword [ecx + eax + 6], 0
jmp 0x41bbc6
test edi, edi
je 0x41bd89
mov ecx, dword [edi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 6
cmp eax, dword [ecx + 0x14]
jbe 0x41bd89
push str.chmapif_parse_fwlog_changestatus
push 0x332
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, 6
mov ecx, edi
call fcn.00440270
mov edi, dword [0x4a7a90]
add esp, 0xc
mov esi, dword [edi*4 + 0x4b5420]
mov edx, 0x272a
mov ebx, dword [ebp - 0x44]
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
mov word [ecx + eax], dx
mov edx, 6
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
mov dword [ecx + eax + 2], ebx
jmp 0x41bbcb
xor bl, bl
test edi, edi
je 0x41bdf2
mov ecx, dword [edi*4 + 0x4b5420]
mov eax, dword [ecx + 0x1c]
add eax, 6
cmp eax, dword [ecx + 0x14]
jbe 0x41bdf2
push str.chmapif_parse_fwlog_changestatus
push 0x339
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
mov edx, 6
mov ecx, edi
call fcn.00440270
mov edi, dword [0x4a7a90]
add esp, 0xc
mov edx, dword [edi*4 + 0x4b5420]
mov esi, 0x2727
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov word [ecx + eax], si
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 0x1c]
mov edx, dword [ebp - 0x44]
mov dword [ecx + eax + 2], edx
mov edx, 6
mov ecx, edi
call fcn.004403f0
mov esi, dword [ebp - 0x40]
jmp 0x41bbd8
mov bl, byte [ebp - 0x54]
mov esi, dword [ebp - 0x40]
and bl, 4
jmp 0x41bbd8
mov edx, dword [ebp - 0x58]
xor al, al
mov ecx, ebx
mov byte [ebp - 0x39], al
call fcn.00418240
jmp case.0x41bb54.7
mov dword [ebp - 0x48], 3
jmp case.0x41bb54.7
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 0x41be98
push 0x309
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu___self_is_NULL_n
call fcn.004427f0
add esp, 0xc
mov dword [ebp - 0x48], 1
jmp case.0x41bb54.7
mov ecx, dword [esi + 4]
mov eax, ecx
sub eax, dword [esi]
test eax, eax
jle 0x41becb
mov byte [ecx], 0
push dword [esi]
push 0x309
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu____s_n
call fcn.004427f0
add esp, 0x10
mov dword [ebp - 0x48], 1
jmp case.0x41bb54.7
push 0x309
push str.D:_ragnarokbr_rathena_srccharchar_mapif.cpp
push str.at__s:_lu_n
call fcn.004427f0
add esp, 0xc
mov dword [ebp - 0x48], 1
jmp case.0x41bb54.7
mov dword [ebp - 0x48], 1
jmp 0x41bbd5
test edx, edx
je 0x41bf0a
push edx
push 0
push ecx
call fcn.00461440
add esp, 0xc
mov esi, dword [edi + 0x1c]
mov edx, 0x22
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 0x64]
mov word [esi + eax + 0x1e], cx
mov esi, dword [edi + 0x1c]
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 0x48]
mov word [esi + eax + 0x20], cx
mov ecx, ebx
call fcn.004403f0
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