Function at 0x40d550
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9dc
mov eax, dword [0x422008]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ecx + 4]
movq xmm0, qword [ecx + 6]
push ebx
push esi
lea esi, [ecx + 6]
mov word [ebp - 0x9cc], ax
movzx eax, word [esi + 8]
push edi
push esi
mov word [ebp - 0x9c2], ax
mov al, byte [esi + 0xa]
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
push 0x422408
mov dword [ebp - 0x9dc], edx
mov byte [ebp - 0x9d0], 0xc2
mov byte [ebp - 0x9cd], 1
mov dword [ebp - 0x9a4], 0x1c
mov dword [ebp - 0x9d4], esi
movq qword [ebp - 0x9ca], xmm0
mov byte [ebp - 0x9c0], al
call fcn.00414eb0
add esp, 0xc
test al, al
mov eax, dword [sym.imp.ODBC32.dll_SQLFetch]
mov dword [ebp - 0x99c], eax
je 0x40d60b
push dword [0x422414]
call eax
cmp ax, 0x64
je 0x40d60b
push dword [0x422414]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0x998], edi
call edi
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov dword [ebp - 0x9a0], ebx
jmp 0x40d650
push dword [0x422414]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0x998], edi
call edi
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x422414]
mov dword [ebp - 0x9a0], ebx
call ebx
push esi
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
push 0x422408
call fcn.00414eb0
add esp, 0xc
push dword [0x422414]
call edi
push 2
push dword [0x422414]
call ebx
push esi
push str.SELECT_AccountID_FROM_CustomJewelBank_WHERE_AccountID_s
push 0x422408
call fcn.00414eb0
add esp, 0xc
test al, al
je 0x40d683
push dword [0x422414]
call dword [ebp - 0x99c]
cmp ax, 0x64
jne 0x40d6a8
push dword [0x422414]
call edi
push 2
push dword [0x422414]
call ebx
push esi
push str.INSERT_INTO_CustomJewelBank__AccountID_Bless_Soul_Chaos_Creation_Life_Harmony_Guardian_Gemstone_LowRefine_HigRefine__VALUES___s_0_0_0_0_0_0_0_0_0_0_
push 0x422408
call fcn.00414eb0
add esp, 0xc
push dword [0x422414]
call edi
push 2
push dword [0x422414]
call ebx
push 0x6e
lea eax, [ebp - 0x78]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x422408
call fcn.00414eb0
add esp, 0xc
push dword [0x422414]
call dword [ebp - 0x99c]
push str.MoveCnt
call fcn.00415100
mov ebx, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [ebp - 0x9b4], ebx
cmp eax, 0xffffffff
jne 0x40d709
or eax, 0xffffffff
jmp 0x40d717
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.ExtClass
mov byte [ebp - 0x9bf], al
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d730
or eax, eax
jmp 0x40d73e
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.ExtWarehouse
mov byte [ebp - 0x9be], al
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d757
or eax, eax
jmp 0x40d765
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.Slot
mov byte [ebp - 0x9bd], al
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d77e
or eax, eax
jmp 0x40d78c
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
movzx eax, al
push str.GameID1
mov dword [ebp - 0x9d8], eax
call fcn.00415100
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
cmp eax, 0xffffffff
je 0x40d7c0
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x78]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID2
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d7e3
xorps xmm0, xmm0
mov word [ebp - 0x65], 0
movq qword [ebp - 0x6d], xmm0
mov byte [ebp - 0x63], 0
jmp 0x40d7f9
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x6d]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID3
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d81c
xorps xmm0, xmm0
mov word [ebp - 0x5a], 0
movq qword [ebp - 0x62], xmm0
mov byte [ebp - 0x58], 0
jmp 0x40d832
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x62]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID4
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d855
xorps xmm0, xmm0
mov word [ebp - 0x4f], 0
movq qword [ebp - 0x57], xmm0
mov byte [ebp - 0x4d], 0
jmp 0x40d86b
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x57]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID5
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d88e
xorps xmm0, xmm0
mov word [ebp - 0x44], 0
movq qword [ebp - 0x4c], xmm0
mov byte [ebp - 0x42], 0
jmp 0x40d8a4
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x4c]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID6
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d8c7
xorps xmm0, xmm0
mov word [ebp - 0x39], 0
movq qword [ebp - 0x41], xmm0
mov byte [ebp - 0x37], 0
jmp 0x40d8dd
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x41]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID7
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d900
xorps xmm0, xmm0
mov word [ebp - 0x2e], 0
movq qword [ebp - 0x36], xmm0
mov byte [ebp - 0x2c], 0
jmp 0x40d916
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x36]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID8
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d939
xorps xmm0, xmm0
mov word [ebp - 0x23], 0
movq qword [ebp - 0x2b], xmm0
mov byte [ebp - 0x21], 0
jmp 0x40d94f
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x2b]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID9
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d972
xorps xmm0, xmm0
mov word [ebp - 0x18], 0
movq qword [ebp - 0x20], xmm0
mov byte [ebp - 0x16], 0
jmp 0x40d988
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x20]
push 0xb
push eax
call esi
add esp, 0x10
push str.GameID10
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40d9ab
xorps xmm0, xmm0
mov word [ebp - 0xd], 0
movq qword [ebp - 0x15], xmm0
mov byte [ebp - 0xb], 0
jmp 0x40d9c1
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x15]
push 0xb
push eax
call esi
add esp, 0x10
push dword [0x422414]
call edi
mov esi, dword [ebp - 0x9a0]
push 2
push dword [0x422414]
call esi
xor al, al
lea edi, [ebp - 0x78]
mov byte [ebp - 0x992], al
mov byte [ebp - 0x9bc], al
xor eax, eax
mov dword [ebp - 0x9a8], eax
lea eax, [ebp - 0x91c]
mov dword [ebp - 0x9b0], eax
xor eax, eax
cmp byte [edi], 0
je 0x40dd26
push edi
push dword [ebp - 0x9d4]
push str.SELECT_cLevel_Class_Inventory_CtlCode_FROM_Character_WHERE_AccountID_s_AND_Name_s
push 0x422408
call fcn.00414eb0
add esp, 0x10
test al, al
je 0x40dd0a
push dword [0x422414]
call dword [ebp - 0x99c]
cmp ax, 0x64
je 0x40dd0a
mov eax, dword [ebp - 0x9a8]
movq xmm0, qword [edi]
mov byte [ebp - 0x990], al
mov ax, word [edi + 8]
mov word [ebp - 0x987], ax
mov al, byte [edi + 0xa]
push str.cLevel
movq qword [ebp - 0x98f], xmm0
mov byte [ebp - 0x985], al
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40da7f
or eax, eax
jmp 0x40da8d
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.Class
mov word [ebp - 0x984], ax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40daa7
or eax, eax
jmp 0x40dab5
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
movzx eax, al
mov word [ebp - 0x982], ax
lea eax, [ebp - 0x138]
push 0xc0
push eax
push str.Inventory
call fcn.00415160
push str.CtlCode
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40dae8
or eax, eax
jmp 0x40daf6
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.ResetCount
mov byte [ebp - 0x980], al
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40db0f
or eax, eax
jmp 0x40db1d
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.MasterResetCount
mov dword [ebp - 0x940], eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40db36
or eax, eax
jmp 0x40db44
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push dword [0x422414]
mov dword [ebp - 0x93c], eax
call dword [ebp - 0x998]
push 2
push dword [0x422414]
call esi
push 0x3c
lea eax, [ebp - 0x97f]
push 0xff
push eax
call sub.VCRUNTIME140.dll_memset
lea edx, [ebp - 0x97e]
add esp, 0xc
mov dword [ebp - 0x9ac], edx
lea ecx, [ebp - 0x131]
mov esi, 0xc
nop dword [eax]
mov bl, byte [ecx - 7]
cmp bl, 0xff
jne 0x40dbb6
cmp byte [ecx], 0
jge 0x40dbb6
mov al, byte [ecx + 2]
and al, 0xf0
cmp al, 0xf0
jne 0x40dbb6
or al, bl
mov byte [ebp - 0x991], bl
or ah, bl
or bh, bl
or bl, bl
jmp 0x40dbcd
mov dl, byte [ecx - 6]
mov al, byte [ecx + 2]
mov ah, byte [ecx + 1]
mov bh, byte [ecx]
mov byte [ebp - 0x991], dl
mov edx, dword [ebp - 0x9ac]
mov byte [edx - 1], bl
add ecx, 0x10
mov bl, byte [ebp - 0x991]
mov byte [edx], bl
mov byte [edx + 1], bh
mov byte [edx + 2], ah
mov byte [edx + 3], al
add edx, 5
mov dword [ebp - 0x9ac], edx
sub esi, 1
jne 0x40db90
push edi
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
push 0x422408
call fcn.00414eb0
add esp, 0xc
test al, al
je 0x40dc64
push dword [0x422414]
call dword [ebp - 0x99c]
cmp ax, 0x64
je 0x40dc64
push str.G_Status
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40dc2e
or eax, eax
jmp 0x40dc40
shl eax, 0xd
add eax, 0x423036
push eax
call dword [ebp - 0x9b4]
add esp, 4
push dword [0x422414]
mov byte [ebp - 0x943], al
call dword [ebp - 0x998]
mov esi, dword [ebp - 0x9a0]
push 2
push dword [0x422414]
call esi
jmp 0x40dc87
push dword [0x422414]
call dword [ebp - 0x998]
mov esi, dword [ebp - 0x9a0]
push 2
push dword [0x422414]
call esi
mov byte [ebp - 0x943], 0xff
mov eax, dword [ebp - 0x9b0]
movups xmm0, xmmword [ebp - 0x990]
mov edx, dword [ebp - 0x9a4]
mov cl, byte [ebp - 0x992]
add edx, 0x58
movups xmmword [eax], xmm0
mov ebx, dword [ebp - 0x9b4]
movups xmm0, xmmword [ebp - 0x980]
mov dword [ebp - 0x9a4], edx
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x970]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x960]
movups xmmword [eax + 0x30], xmm0
movups xmm0, xmmword [ebp - 0x950]
movups xmmword [eax + 0x40], xmm0
movq xmm0, qword [ebp - 0x940]
movq qword [eax + 0x50], xmm0
add eax, 0x58
inc cl
mov dword [ebp - 0x9b0], eax
mov eax, dword [ebp - 0x9a8]
mov byte [ebp - 0x992], cl
mov byte [ebp - 0x9bc], cl
jmp 0x40dd2c
push dword [0x422414]
call dword [ebp - 0x998]
push 2
push dword [0x422414]
call esi
mov eax, dword [ebp - 0x9a8]
mov edx, dword [ebp - 0x9a4]
inc eax
add edi, 0xb
mov dword [ebp - 0x9a8], eax
cmp eax, 0xa
jl 0x40da00
mov eax, edx
mov byte [ebp - 0x9ce], dl
shr eax, 8
mov byte [ebp - 0x9cf], al
movups xmm0, xmmword [ebp - 0x9d0]
mov eax, dword [ebp - 0x9d8]
mov dword [ebp - 0x920], eax
lea eax, [ebp - 0x938]
push edx
push eax
push dword [ebp - 0x9dc]
movups xmmword [ebp - 0x938], xmm0
movq xmm0, qword [ebp - 0x9c0]
movq qword [ebp - 0x928], xmm0
call fcn.004163f0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417e1d
mov esp, ebp
pop ebp
ret