Function at 0x40cca0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x99c
mov eax, dword [0x44000c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x998], edx
movq xmm0, qword [ebx + 6]
lea ecx, [ebx + 6]
push esi
push edi
movzx eax, word [ebx + 4]
mov word [ebp - 0x98c], ax
movzx eax, word [ecx + 8]
mov word [ebp - 0x982], ax
mov al, byte [ecx + 0xa]
mov byte [ebp - 0x980], al
mov eax, dword [ebx + 0x14]
mov byte [ebp - 0x990], 0xc2
mov byte [ebp - 0x98d], 1
mov dword [ebp - 0x964], 0x16
mov dword [ebp - 0x994], ecx
movq qword [ebp - 0x98a], xmm0
push ecx
cmp eax, 2
jne 0x40cd88
push str.SELECT_Id_FROM_AccountCharacter2_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
mov eax, dword [sym.imp.ODBC32.dll_SQLFetch]
mov dword [ebp - 0x960], eax
je 0x40cd5c
push dword [0x440e3c]
call eax
cmp ax, 0x64
je 0x40cd5c
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40cf71
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call edi
lea eax, [ebx + 6]
push eax
push str.INSERT_INTO_AccountCharacter2__Id__VALUES___s_
jmp 0x40cf5c
cmp eax, 3
jne 0x40ce01
push str.SELECT_Id_FROM_AccountCharacter3_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
mov eax, dword [sym.imp.ODBC32.dll_SQLFetch]
mov dword [ebp - 0x960], eax
je 0x40cdd5
push dword [0x440e3c]
call eax
cmp ax, 0x64
je 0x40cdd5
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40cf71
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call edi
lea eax, [ebx + 6]
push eax
push str.INSERT_INTO_AccountCharacter3__Id__VALUES___s_
jmp 0x40cf5c
cmp eax, 4
jne 0x40ce7a
push str.SELECT_Id_FROM_AccountCharacter4_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
mov eax, dword [sym.imp.ODBC32.dll_SQLFetch]
mov dword [ebp - 0x960], eax
je 0x40ce4e
push dword [0x440e3c]
call eax
cmp ax, 0x64
je 0x40ce4e
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40cf71
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call edi
lea eax, [ebx + 6]
push eax
push str.INSERT_INTO_AccountCharacter4__Id__VALUES___s_
jmp 0x40cf5c
cmp eax, 5
jne 0x40cef0
push str.SELECT_Id_FROM_AccountCharacter5_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
mov eax, dword [sym.imp.ODBC32.dll_SQLFetch]
mov dword [ebp - 0x960], eax
je 0x40cec7
push dword [0x440e3c]
call eax
cmp ax, 0x64
je 0x40cec7
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40cf71
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call edi
lea eax, [ebx + 6]
push eax
push str.INSERT_INTO_AccountCharacter5__Id__VALUES___s_
jmp 0x40cf5c
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
mov eax, dword [sym.imp.ODBC32.dll_SQLFetch]
mov dword [ebp - 0x960], eax
je 0x40cf35
push dword [0x440e3c]
call eax
cmp ax, 0x64
je 0x40cf35
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40cf71
push dword [0x440e3c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call edi
lea eax, [ebx + 6]
push eax
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
push 0x440e30
call fcn.00416550
add esp, 0xc
push dword [0x440e3c]
call esi
push 2
push dword [0x440e3c]
call edi
push 0x37
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.0041b490
mov ecx, dword [ebx + 0x14]
add esp, 0xc
cmp ecx, 2
jne 0x40cf9a
mov eax, str.SELECT__FROM_AccountCharacter2_WHERE_Id_s
jmp 0x40cfc2
cmp ecx, 3
jne 0x40cfa6
mov eax, str.SELECT__FROM_AccountCharacter3_WHERE_Id_s
jmp 0x40cfc2
cmp ecx, 4
jne 0x40cfb2
mov eax, str.SELECT__FROM_AccountCharacter4_WHERE_Id_s
jmp 0x40cfc2
cmp ecx, 5
mov eax, str.SELECT__FROM_AccountCharacter5_WHERE_Id_s
mov edx, str.SELECT__FROM_AccountCharacter_WHERE_Id_s
cmovne eax, edx
lea ecx, [ebx + 6]
push ecx
push eax
push 0x440e30
call fcn.00416550
add esp, 0xc
push dword [0x440e3c]
call dword [ebp - 0x960]
push str.MoveCnt
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40cff3
or eax, eax
jmp 0x40d004
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push str.ExtClass
mov byte [ebp - 0x97f], al
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d01d
or eax, eax
jmp 0x40d02e
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push str.ExtWarehouse
mov byte [ebp - 0x97e], al
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d047
or eax, eax
jmp 0x40d058
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push str.GameID1
mov byte [ebp - 0x97d], al
call fcn.004167c0
cmp eax, 0xffffffff
je 0x40d086
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x3c]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID2
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d0a9
xorps xmm0, xmm0
mov word [ebp - 0x29], 0
movq qword [ebp - 0x31], xmm0
mov byte [ebp - 0x27], 0
jmp 0x40d0c2
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x31]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID3
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d0e5
xorps xmm0, xmm0
mov word [ebp - 0x1e], 0
movq qword [ebp - 0x26], xmm0
mov byte [ebp - 0x1c], 0
jmp 0x40d0fe
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x26]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID4
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d121
xorps xmm0, xmm0
mov word [ebp - 0x13], 0
movq qword [ebp - 0x1b], xmm0
mov byte [ebp - 0x11], 0
jmp 0x40d13a
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x1b]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID5
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d15d
xorps xmm0, xmm0
mov word [ebp - 8], 0
movq qword [ebp - 0x10], xmm0
mov byte [ebp - 6], 0
jmp 0x40d176
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x10]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push dword [0x440e3c]
call esi
push 2
push dword [0x440e3c]
call edi
xor al, al
lea ebx, [ebp - 0x3c]
mov byte [ebp - 0x95a], al
mov byte [ebp - 0x97c], al
xor eax, eax
mov dword [ebp - 0x968], eax
lea eax, [ebp - 0x8ea]
mov dword [ebp - 0x974], eax
xor eax, eax
mov dword [ebp - 0x978], ebx
cmp byte [ebx], 0
je 0x40d4d1
push ebx
push dword [ebp - 0x994]
push str.SELECT_cLevel_Class_Inventory_CtlCode_ResetCount_MasterResetCount_FROM_Character_WHERE_AccountID_s_AND_Name_s
push 0x440e30
call fcn.00416550
add esp, 0x10
test al, al
je 0x40d4b9
push dword [0x440e3c]
call dword [ebp - 0x960]
cmp ax, 0x64
je 0x40d4b9
mov eax, dword [ebp - 0x968]
movq xmm0, qword [ebx]
mov byte [ebp - 0x958], al
mov ax, word [ebx + 8]
mov word [ebp - 0x94f], ax
mov al, byte [ebx + 0xa]
push str.cLevel
movq qword [ebp - 0x957], xmm0
mov byte [ebp - 0x94d], al
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d234
or eax, eax
jmp 0x40d245
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push str.Class
mov word [ebp - 0x94c], ax
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d25f
or eax, eax
jmp 0x40d270
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
mov byte [ebp - 0x94a], al
lea eax, [ebp - 0x100]
push 0xc0
push eax
push str.Inventory
call fcn.00416810
push str.CtlCode
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d29f
or eax, eax
jmp 0x40d2b0
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push str.ResetCount
mov byte [ebp - 0x949], al
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d2c9
or eax, eax
jmp 0x40d2da
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push str.MasterResetCount
mov dword [ebp - 0x908], eax
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d2f3
or eax, eax
jmp 0x40d304
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push dword [0x440e3c]
mov dword [ebp - 0x904], eax
call esi
push 2
push dword [0x440e3c]
call edi
push 0x3c
lea eax, [ebp - 0x948]
push 0xff
push eax
call fcn.0041b490
lea edx, [ebp - 0x947]
mov dword [ebp - 0x970], 0xc
add esp, 0xc
mov dword [ebp - 0x96c], edx
lea ecx, [ebp - 0xf9]
nop
mov bl, byte [ecx - 7]
cmp bl, 0xff
jne 0x40d376
cmp byte [ecx], 0
jge 0x40d376
mov al, byte [ecx + 2]
and al, 0xf0
cmp al, 0xf0
jne 0x40d376
or al, bl
mov byte [ebp - 0x959], bl
or ah, bl
or bh, bl
or bl, bl
jmp 0x40d38d
mov dl, byte [ecx - 6]
mov al, byte [ecx + 2]
mov ah, byte [ecx + 1]
mov bh, byte [ecx]
mov byte [ebp - 0x959], dl
mov edx, dword [ebp - 0x96c]
mov byte [edx - 1], bl
add ecx, 0x10
mov bl, byte [ebp - 0x959]
mov byte [edx], bl
mov byte [edx + 1], bh
mov byte [edx + 2], ah
mov byte [edx + 3], al
add edx, 5
sub dword [ebp - 0x970], 1
mov dword [ebp - 0x96c], edx
jne 0x40d350
mov ebx, dword [ebp - 0x978]
push ebx
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
je 0x40d423
push dword [0x440e3c]
call dword [ebp - 0x960]
cmp ax, 0x64
je 0x40d423
push str.G_Status
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40d3f8
or eax, eax
jmp 0x40d409
shl eax, 0xe
add eax, 0x441a62
push eax
call fcn.00422137
add esp, 4
push dword [0x440e3c]
mov byte [ebp - 0x90c], al
call esi
push 2
push dword [0x440e3c]
call edi
jmp 0x40d43c
push dword [0x440e3c]
call esi
push 2
push dword [0x440e3c]
call edi
mov byte [ebp - 0x90c], 0xff
mov eax, dword [ebp - 0x974]
movups xmm0, xmmword [ebp - 0x958]
mov edx, dword [ebp - 0x964]
mov cl, byte [ebp - 0x95a]
add edx, 0x58
movups xmmword [eax], xmm0
mov dword [ebp - 0x964], edx
movups xmm0, xmmword [ebp - 0x948]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x938]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x928]
movups xmmword [eax + 0x30], xmm0
movups xmm0, xmmword [ebp - 0x918]
movups xmmword [eax + 0x40], xmm0
movq xmm0, qword [ebp - 0x908]
movq qword [eax + 0x50], xmm0
add eax, 0x58
inc cl
mov dword [ebp - 0x974], eax
mov eax, dword [ebp - 0x968]
mov byte [ebp - 0x95a], cl
mov byte [ebp - 0x97c], cl
jmp 0x40d4d7
push dword [0x440e3c]
call esi
push 2
push dword [0x440e3c]
call edi
mov eax, dword [ebp - 0x968]
mov edx, dword [ebp - 0x964]
inc eax
add ebx, 0xb
mov dword [ebp - 0x968], eax
mov dword [ebp - 0x978], ebx
cmp eax, 5
jl 0x40d1b5
mov eax, edx
mov byte [ebp - 0x98e], dl
shr eax, 8
mov byte [ebp - 0x98f], al
mov eax, dword [ebp - 0x980]
movups xmm0, xmmword [ebp - 0x990]
mov dword [ebp - 0x8f0], eax
mov ax, word [ebp - 0x97c]
mov word [ebp - 0x8ec], ax
lea eax, [ebp - 0x900]
push edx
push eax
push dword [ebp - 0x998]
movups xmmword [ebp - 0x900], xmm0
call fcn.00418230
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004197fb
mov esp, ebp
pop ebp
ret