Function at 0x40a0c0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x49d86a
mov eax, dword fs:[0]
push eax
mov eax, 0x7d48
mov dword fs:[0], esp
call fcn.0047f090
mov eax, dword [0x4d2084]
xor eax, esp
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov edi, ecx
push 0x324
mov dword [esp + 0x7d58], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x410c], ebx
mov dword [esp + 0x4110], ebx
mov dword [esp + 0x4114], ebx
mov byte [esp + 0x4118], bl
call fcn.0047c990
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, ebx
mov dword [esp + 0x7d60], ebx
je 0x40a13c
mov ecx, eax
call fcn.00407ac0
mov esi, eax
jmp 0x40a13e
xor esi, esi
mov ebp, dword [esp + 0x7d6c]
push ebp
push ebp
lea eax, [esp + 0x411c]
push str.SELECT_user.ID_user.Name_user.AccountID_user.Scene_user.X_user.Y_user.HP_user.MP_user.EXP_user.AP_user.Level_user.Metier_user.MetierLevel_user.SP_user.Str_user.Con_user.Dex_user.Int_user.Hit_user.Skills_user.Items_community.Friend_community.GuildID_user.ActorID_user.Faction_user.PK_user.Shortcut_user.Task_user.HeadModelID_user.Credit_user.OnlineTime_user.Config_user.Gold_UNIX_TIMESTAMP_user.LastDelUnionTime__user.ClearCnt_user.DungeonTID_user.DungeonUID_user.dungeonQuit_user.DungeonTask_user.InWarfield_user.WarfieldQuit_user.UsData_UNIX_TIMESTAMP_user.LastRemoveMPTime__user.WithdrawMPGift_UNIX_TIMESTAMP_LastUpdateDate__user.MyData_user.Lottery_FROM_user_community_WHERE_user.ID___d_AND_community.UserID___d_LIMIT_1
push eax
mov dword [esp + 0x7d70], 0xffffffff
call fcn.0047f034
add esp, 0x10
push 1
push ebx
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x4120]
push edx
mov ecx, edi
call fcn.00404890
test al, al
jne 0x40a1a1
cmp esi, ebx
je 0x40a9e0
mov ecx, esi
call fcn.00403e30
push esi
call fcn.0047e60d
add esp, 4
xor eax, eax
jmp 0x40ac90
mov ebx, dword [esp + 0x10]
push ebx
call sub.LIBMYSQL.dll_mysql_num_rows
xor ecx, ecx
cmp eax, ecx
jne 0x40a1b5
cmp esi, ecx
jmp 0x40a184
mov eax, 0xf
mov dword [esp + 0x40e4], eax
mov dword [esp + 0x40e0], ecx
mov byte [esp + 0x40d0], 0
mov dword [esp + 0x7d60], 1
mov dword [esp + 0x40c8], eax
mov dword [esp + 0x40c4], ecx
mov byte [esp + 0x40b4], 0
push ebx
mov byte [esp + 0x7d64], 2
call sub.LIBMYSQL.dll_mysql_fetch_row
push ebx
mov edi, eax
call sub.LIBMYSQL.dll_mysql_fetch_lengths
mov dword [esi], ebp
mov ecx, dword [edi + 4]
mov dword [esp + 0x14], eax
mov eax, ecx
lea ebp, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a215
sub eax, ebp
push eax
lea edx, [esi + 0x94]
push ecx
mov ecx, edx
call fcn.004018c0
mov eax, dword [edi + 4]
push eax
call fcn.0049bdde
mov ecx, eax
add esp, 4
lea ebp, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40a240
sub ecx, ebp
push ecx
push eax
lea ecx, [esi + 0x2b8]
call fcn.004018c0
mov ecx, dword [edi + 8]
mov eax, ecx
lea ebp, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a260
sub eax, ebp
push eax
push ecx
lea ecx, [esp + 0x40d4]
call fcn.004018c0
mov ecx, dword [edi + 0xc]
mov eax, ecx
lea ebp, [eax + 1]
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a280
sub eax, ebp
push eax
lea ebx, [esi + 0x5c]
push ecx
mov ecx, ebx
call fcn.004018c0
mov ecx, dword [edi + 0x10]
push ecx
call fcn.0047f135
mov dword [esi + 0x21c], eax
mov edx, dword [edi + 0x14]
push edx
call fcn.0047f135
mov dword [esi + 0x220], eax
mov eax, dword [edi + 0x18]
push eax
call fcn.0047f135
mov dword [esi + 0x214], eax
mov ecx, dword [edi + 0x1c]
push ecx
call fcn.0047f135
mov dword [esi + 0x218], eax
mov edx, dword [edi + 0x20]
push edx
call fcn.0047f135
mov dword [esi + 0x208], eax
mov eax, dword [edi + 0x24]
push eax
call fcn.0047f135
mov dword [esi + 0x20c], eax
mov ecx, dword [edi + 0x28]
push ecx
call fcn.0047f135
mov dword [esi + 0x204], eax
mov edx, dword [edi + 0x2c]
push edx
call fcn.0047f135
mov word [esi + 0x1fe], ax
mov eax, dword [edi + 0x30]
push eax
call fcn.0047f135
mov word [esi + 0x200], ax
mov ecx, dword [edi + 0x34]
push ecx
call fcn.0047f135
mov dword [esi + 0x210], eax
mov edx, dword [edi + 0x38]
push edx
call fcn.0047f135
mov word [esi + 0x226], ax
mov eax, dword [edi + 0x3c]
push eax
call fcn.0047f135
mov word [esi + 0x224], ax
mov ecx, dword [edi + 0x40]
push ecx
call fcn.0047f135
mov word [esi + 0x228], ax
mov edx, dword [edi + 0x44]
push edx
call fcn.0047f135
mov word [esi + 0x22a], ax
mov eax, dword [edi + 0x48]
push eax
call fcn.0047f135
mov word [esi + 0x22c], ax
mov ecx, dword [edi + 0x4c]
mov eax, ecx
add esp, 0x3c
lea ebp, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a388
sub eax, ebp
push eax
push ecx
lea ecx, [esi + 0xb0]
call fcn.004018c0
mov ecx, dword [edi + 0x50]
mov eax, ecx
lea ebp, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a3a6
sub eax, ebp
push eax
push ecx
lea ecx, [esi + 0xe8]
call fcn.004018c0
mov ecx, dword [edi + 0x54]
mov eax, ecx
lea ebp, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a3c4
sub eax, ebp
push eax
push ecx
lea ecx, [esi + 0x108]
call fcn.004018c0
mov ecx, dword [edi + 0x58]
push ecx
call fcn.0047f135
mov dword [esi + 4], eax
mov edx, dword [edi + 0x5c]
push edx
call fcn.0047f135
mov word [esi + 0x1fc], ax
mov eax, dword [edi + 0x60]
push eax
call fcn.0047f135
mov word [esi + 0x202], ax
mov ecx, dword [edi + 0x64]
push ecx
call fcn.0047f135
mov dword [esi + 0x234], eax
mov ecx, dword [edi + 0x68]
add esp, 0x10
test ecx, ecx
je 0x40a43a
mov eax, ecx
lea ebp, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a424
sub eax, ebp
push eax
push ecx
lea ecx, [esi + 0x140]
call fcn.004018c0
mov edx, dword [edi + 0x6c]
test edx, edx
je 0x40a45c
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a446
sub eax, ebp
push eax
push edx
lea ecx, [esi + 0x178]
call fcn.004018c0
mov edx, dword [edi + 0x70]
push edx
call fcn.0047f135
mov word [esi + 0x194], ax
mov eax, dword [edi + 0x74]
push eax
call fcn.0047f135
mov dword [esi + 0x238], eax
mov ecx, dword [edi + 0x78]
push ecx
call fcn.0047f135
mov dword [esi + 0x25c], eax
mov ecx, dword [edi + 0x7c]
add esp, 0xc
test ecx, ecx
je 0x40a4b6
mov eax, ecx
lea ebp, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a4a0
sub eax, ebp
push eax
push ecx
lea ecx, [esi + 0x15c]
call fcn.004018c0
mov edx, dword [edi + 0x80]
push edx
call fcn.0047f135
mov dword [esi + 0x104], eax
mov eax, dword [edi + 0x84]
add esp, 4
test eax, eax
je 0x40a4e6
push eax
call fcn.0047f135
add esp, 4
mov dword [esi + 0x2d8], eax
jmp 0x40a4f0
mov dword [esi + 0x2d8], 0
mov eax, dword [edi + 0x88]
push eax
call fcn.0047f135
mov word [esi + 0x23c], ax
mov ecx, dword [edi + 0x8c]
push ecx
call fcn.0047f135
mov dword [esi + 0x1d8], eax
mov edx, dword [edi + 0x90]
push edx
call fcn.0047f135
mov dword [esi + 0x1d4], eax
mov eax, dword [edi + 0x94]
push eax
call fcn.0047f135
mov dword [esi + 0x1dc], eax
mov ecx, dword [edi + 0x98]
add esp, 0x10
test ecx, ecx
je 0x40a566
mov eax, ecx
lea ebp, [eax + 1]
jmp 0x40a550
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a550
sub eax, ebp
push eax
push ecx
lea ecx, [esi + 0x1e0]
call fcn.004018c0
mov ecx, dword [edi + 0x9c]
push ecx
call fcn.0047f135
test eax, eax
setne dl
mov byte [esi + 0x260], dl
mov eax, dword [edi + 0xa0]
push eax
call fcn.0047f135
mov dword [esi + 0x264], eax
mov edx, dword [edi + 0xa4]
add esp, 8
test edx, edx
je 0x40a5b8
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a5a1
sub eax, ebp
push eax
push edx
lea ecx, [esp + 0x40b8]
call fcn.004018c0
mov ecx, dword [edi + 0xa8]
push ecx
call fcn.0047f135
mov dword [esi + 0x2dc], eax
mov edx, dword [edi + 0xac]
push edx
call fcn.0047f135
mov dword [esi + 0x2e0], eax
mov eax, dword [edi + 0xb0]
push eax
call fcn.0047f135
mov dword [esi + 0x250], eax
mov eax, dword [edi + 0xb4]
xor ebp, ebp
add esp, 0xc
cmp eax, ebp
je 0x40a614
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xb4]
push edx
push eax
lea ecx, [esi + 0x254]
call fcn.00404580
mov eax, dword [edi + 0xb8]
push eax
call fcn.0047f135
push ebp
mov dword [esi + 0x270], eax
mov dword [esi + 0x268], ebp
mov dword [esi + 0x2f8], ebp
mov byte [esi + 0x320], 0
call fcn.0047f0fc
mov dword [esi + 0x2fc], eax
mov eax, dword [esi + 0x1d4]
add esp, 8
cmp eax, ebp
mov edi, 0x10
jne 0x40a6c0
mov al, byte [esi + 0x260]
test al, al
jne 0x40a6c0
cmp dword [ebx + 0x18], edi
jb 0x40a66b
mov eax, dword [ebx + 4]
jmp 0x40a66e
lea eax, [ebx + 4]
push eax
mov ecx, 0x4d8ac8
call fcn.0042a550
test al, al
jne 0x40a6c0
cmp dword [ebx + 0x18], edi
jb 0x40a687
mov eax, dword [ebx + 4]
jmp 0x40a68a
lea eax, [ebx + 4]
mov ecx, dword [0x52f0ec]
push eax
push str.error_scene__s_n
push ecx
call fcn.0048dda0
movsx edx, word [esi + 0x202]
add esp, 0xc
lea eax, [esi + 0x220]
push eax
lea eax, [esi + 0x21c]
push eax
push ebx
push edx
mov ecx, 0x4d8ac8
call fcn.0042fdd0
push ebx
mov ecx, 0x4d8c38
call fcn.00409a00
mov ecx, dword [esi]
mov eax, dword [eax]
push 2
push ecx
mov ecx, 0x4d8ac8
mov dword [esi + 0x2b0], eax
mov dword [esi + 0x24c], 0xffffffff
call fcn.00428db0
test eax, eax
je 0x40a6f7
and dword [esi + 0x24c], 0xfffffffd
mov edx, dword [esi]
push 8
push edx
mov ecx, 0x4d8ac8
call fcn.00428db0
test eax, eax
je 0x40a711
and dword [esi + 0x24c], 0xfffffff7
mov eax, dword [esi]
push 4
push eax
mov ecx, 0x4d8ac8
call fcn.00428db0
cmp eax, ebp
je 0x40a72b
and dword [esi + 0x24c], 0xfffffffb
mov ecx, dword [esp + 0x10]
push ecx
call sub.LIBMYSQL.dll_mysql_free_result
mov ebx, dword [esp + 0x7d68]
push ebx
lea edx, [esp + 0x4118]
push str.SELECT_Items_BankMoney_Password_Point_FROM_T_bank_WHERE_AccountID_d
push edx
call fcn.0047f034
add esp, 0xc
push 1
push 0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x4120]
push ecx
mov ecx, dword [esp + 0x28]
call fcn.00404890
test al, al
jne 0x40a7e2
mov ecx, esi
call fcn.00403e30
push esi
call fcn.0047e60d
mov eax, dword [esp + 0x40cc]
mov esi, 0x10
add esp, 4
cmp eax, esi
jb 0x40a7a0
mov edx, dword [esp + 0x40b4]
push edx
call fcn.0047e60d
add esp, 4
cmp dword [esp + 0x40e4], esi
mov dword [esp + 0x40c8], 0xf
mov dword [esp + 0x40c4], 0
mov byte [esp + 0x40b4], 0
jb 0x40a9e0
mov eax, dword [esp + 0x40d0]
push eax
call fcn.0047e60d
add esp, 4
xor eax, eax
jmp 0x40ac90
mov ebp, dword [esp + 0x10]
push ebp
call sub.LIBMYSQL.dll_mysql_num_rows
test eax, eax
jne 0x40a8db
mov ecx, dword [0x4d96c0]
push 0x4d96a8
push 1
push 6
push ecx
lea ecx, [esp + 0x7c]
call fcn.0045eba0
push 0x4d96a8
lea ecx, [esp + 0x70]
mov byte [esp + 0x7d64], 3
lea edi, [esi + 0x198]
call fcn.0045ec80
push eax
mov ecx, edi
call fcn.00403620
xor ebp, ebp
mov dword [esi + 0x1b4], ebp
mov dword [esi + 0x268], ebp
cmp dword [edi + 0x18], 0x10
jb 0x40a84a
mov edi, dword [edi + 4]
jmp 0x40a84d
add edi, 4
cmp dword [esp + 0x40e4], 0x10
mov eax, dword [esp + 0x40d0]
jae 0x40a865
lea eax, [esp + 0x40d0]
push 0x4aa28a
push ebp
push ebp
push edi
push eax
push ebx
lea edx, [esp + 0x412c]
push str.INSERT_INTO_T_bank_AccountID_Account_Items_BankMoney_Point_Password__VALUES__d__s__s__d__d__s_
push edx
call fcn.0047f034
add esp, 0x20
push 1
push ebp
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x4120]
push ecx
mov ecx, 0x4d8c60
call fcn.00404890
test al, al
jne 0x40a8c8
mov ecx, esi
call fcn.00403e30
push esi
call fcn.0047e60d
add esp, 4
lea ecx, [esp + 0x6c]
mov byte [esp + 0x7d60], 2
call fcn.0045e2d0
jmp 0x40a9c8
lea ecx, [esp + 0x6c]
mov byte [esp + 0x7d60], 2
call fcn.0045e2d0
jmp 0x40a92c
push ebp
call sub.LIBMYSQL.dll_mysql_fetch_row
mov edi, eax
mov edx, dword [edi]
push edx
lea ecx, [esi + 0x198]
call fcn.00403620
mov eax, dword [edi + 4]
push eax
call fcn.0047f1bd
mov dword [esi + 0x1b4], eax
mov ecx, dword [edi + 8]
add esp, 4
push ecx
lea ecx, [esi + 0x1b8]
call fcn.00403620
mov edx, dword [edi + 0xc]
push edx
call fcn.0047f1bd
add esp, 4
push ebp
mov dword [esi + 0x268], eax
call sub.LIBMYSQL.dll_mysql_free_result
xor ebp, ebp
mov ebx, dword [esp + 0x7d6c]
push ebx
lea eax, [esp + 0x4118]
push str.SELECT_LostItems_FROM_userExtra_WHERE_ActorID_d
push eax
call fcn.0047f034
add esp, 0xc
push 1
push ebp
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x4120]
push edx
call fcn.00404890
test al, al
je 0x40a9b8
mov edi, dword [esp + 0x10]
push edi
call sub.LIBMYSQL.dll_mysql_num_rows
cmp eax, ebp
jne 0x40a9e7
push 0x4aa28a
lea ecx, [esi + 0x274]
call fcn.00403620
push ebx
lea eax, [esp + 0x4118]
push str.INSERT_INTO_userExtra_ActorID_LostItems__VALUES__d__
push eax
call fcn.0047f034
add esp, 0xc
push 1
push ebp
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x4120]
push edx
mov ecx, 0x4d8c60
call fcn.00404890
test al, al
jne 0x40aa01
mov ecx, esi
call fcn.00403e30
push esi
call fcn.0047e60d
add esp, 4
lea ecx, [esp + 0x40b0]
call fcn.0046cd00
lea ecx, [esp + 0x40cc]
call fcn.0046cd00
xor eax, eax
jmp 0x40ac90
push edi
call sub.LIBMYSQL.dll_mysql_fetch_row
mov eax, dword [eax]
push eax
lea ecx, [esi + 0x274]
call fcn.00403620
push edi
call sub.LIBMYSQL.dll_mysql_free_result
cmp dword [esp + 0x40c4], ebp
je 0x40ac76
mov edx, dword [esi + 0x1b4]
xor eax, eax
mov ecx, 0x14
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, dword [esi]
mov eax, dword [esi + 0x104]
mov dword [esp + 0x20], ecx
mov cx, word [esi + 0x1fe]
mov dword [esp + 0x24], edx
mov dx, word [esi + 0x200]
mov dword [esp + 0x28], eax
mov ax, word [esi + 0x202]
mov word [esp + 0x2c], cx
mov ecx, dword [esi + 0x204]
mov word [esp + 0x2e], dx
mov edx, dword [esi + 0x208]
mov word [esp + 0x30], ax
mov eax, dword [esi + 0x20c]
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0x210]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 0x214]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x218]
mov dword [esp + 0x40], ecx
mov ecx, dword [esi + 0x21c]
mov dword [esp + 0x44], edx
mov edx, dword [esi + 0x220]
mov dword [esp + 0x48], eax
mov ax, word [esi + 0x224]
mov dword [esp + 0x4c], ecx
mov cx, word [esi + 0x226]
mov dword [esp + 0x50], edx
mov dx, word [esi + 0x228]
mov word [esp + 0x54], ax
mov ax, word [esi + 0x22a]
mov word [esp + 0x56], cx
mov cx, word [esi + 0x22c]
mov word [esp + 0x58], dx
mov edx, dword [esi + 0x234]
mov word [esp + 0x5a], ax
mov eax, dword [esi + 0x238]
mov word [esp + 0x5c], cx
mov cx, word [esi + 0x23c]
mov word [esp + 0x1c], 2
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], eax
mov word [esp + 0x68], cx
mov dword [esp + 0x4100], 0xf
mov dword [esp + 0x40fc], ebp
mov byte [esp + 0x40ec], 0
lea edx, [esp + 0x40e8]
push edx
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x7d68], 4
call fcn.00446000
lea ecx, [esp + 0x40b8]
push ecx
lea edx, [esp + 0x40f4]
push edx
call fcn.00404e70
add esp, 0x10
test al, al
je 0x40ac6a
push ebp
lea ecx, [esp + 0x40ec]
call fcn.00404a10
mov al, byte [eax]
push 1
lea ecx, [esp + 0x40ec]
mov byte [esp + 0x7938], al
call fcn.00404a10
mov cl, byte [eax]
mov byte [esp + 0x7935], cl
push ebp
lea ecx, [esp + 0x40b4]
mov byte [esp + 0x793a], 0
call fcn.00404a10
mov dl, byte [eax]
push 1
lea ecx, [esp + 0x40b4]
mov byte [esp + 0x7918], dl
call fcn.00404a10
mov al, byte [eax]
mov byte [esp + 0x7915], al
mov byte [esp + 0x7916], 0
lea edi, [esp + 0x7914]
lea eax, [esp + 0x7934]
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x40ac00
test cl, cl
je 0x40abfc
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x40ac00
add eax, 2
add edi, 2
test cl, cl
jne 0x40abd8
xor eax, eax
jmp 0x40ac05
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x40ac6a
mov eax, dword [esi + 0xac]
mov ecx, 0x10
cmp eax, ecx
jb 0x40ac20
mov eax, dword [esi + 0x98]
jmp 0x40ac26
lea eax, [esi + 0x98]
cmp dword [0x4d8a18], ecx
mov ecx, dword [0x4d8a04]
jae 0x40ac39
mov ecx, 0x4d8a04
mov edx, dword [esi]
push edx
push eax
push ecx
lea eax, [esp + 0x7960]
push str.GW_s_UserName_s_UserID_d
push eax
call fcn.0047f034
add esp, 0x14
lea ecx, [esp + 0x7954]
push ecx
push str.UserAssert
mov ecx, 0x4d8ac8
call fcn.0042fe20
lea ecx, [esp + 0x40e8]
call fcn.0046cd00
lea ecx, [esp + 0x40b0]
call fcn.0046cd00
lea ecx, [esp + 0x40cc]
call fcn.0046cd00
mov eax, esi
mov ecx, dword [esp + 0x7d58]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x7d48]
pop ebx
xor ecx, esp
call fcn.0047ece2
add esp, 0x7d54
ret 8