Function at 0x40b6c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98c
mov eax, dword [0x424018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 4]
mov edx, dword [eax + 6]
push ebx
push esi
lea esi, [eax + 6]
mov eax, dword [esi + 4]
mov word [ebp - 0x978], cx
movzx ecx, word [esi + 8]
push edi
mov dword [ebp - 0x976], edx
mov dl, byte [esi + 0xa]
mov word [ebp - 0x96e], cx
push esi
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x424ee0
mov byte [ebp - 0x97c], 0xc2
mov byte [ebp - 0x979], 1
mov dword [ebp - 0x964], 0x16
mov dword [ebp - 0x988], esi
mov dword [ebp - 0x972], eax
mov byte [ebp - 0x96c], dl
call fcn.00417790
add esp, 8
test al, al
je 0x40b772
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40b772
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x424eec]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40b7b7
mov eax, dword [0x424eec]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call edi
mov ecx, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push ecx
call ebx
push esi
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
mov ecx, 0x424ee0
call fcn.00417790
mov edx, dword [0x424eec]
add esp, 8
push edx
call edi
mov eax, dword [0x424eec]
push 2
push eax
call ebx
push 0x37
lea ecx, [ebp - 0x3c]
push 0
push ecx
call sub.MSVCR100.dll_memset
push esi
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x424ee0
call fcn.00417790
mov edx, dword [0x424eec]
add esp, 0x14
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
push str.MoveCnt
call fcn.00417950
mov edi, dword [sym.imp.MSVCR100.dll_atoi]
cmp eax, 0xffffffff
jne 0x40b7fd
or eax, eax
jmp 0x40b80b
shl eax, 0xd
add eax, 0x425b0e
push eax
call edi
add esp, 4
push str.ExtClass
mov byte [ebp - 0x96b], al
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40b824
or eax, eax
jmp 0x40b832
shl eax, 0xd
add eax, 0x425b0e
push eax
call edi
add esp, 4
push str.ExtWarehouse
mov byte [ebp - 0x96a], al
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40b84b
or eax, eax
jmp 0x40b859
shl eax, 0xd
add eax, 0x425b0e
push eax
call edi
add esp, 4
push str.GameID1
mov byte [ebp - 0x969], al
call fcn.00417950
mov edi, dword [sym.imp.MSVCR100.dll_strncpy_s]
cmp eax, 0xffffffff
jne 0x40b885
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov word [ebp - 0x34], ax
mov byte [ebp - 0x32], al
jmp 0x40b89b
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea eax, [ebp - 0x3c]
push 0xb
push eax
call edi
add esp, 0x10
push str.GameID2
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40b8bb
xor eax, eax
mov dword [ebp - 0x31], eax
mov dword [ebp - 0x2d], eax
mov word [ebp - 0x29], ax
mov byte [ebp - 0x27], al
jmp 0x40b8d1
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea ecx, [ebp - 0x31]
push 0xb
push ecx
call edi
add esp, 0x10
push str.GameID3
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40b8f1
xor eax, eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov word [ebp - 0x1e], ax
mov byte [ebp - 0x1c], al
jmp 0x40b907
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea edx, [ebp - 0x26]
push 0xb
push edx
call edi
add esp, 0x10
push str.GameID4
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40b927
xor eax, eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
jmp 0x40b93d
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea eax, [ebp - 0x1b]
push 0xb
push eax
call edi
add esp, 0x10
push str.GameID5
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40b95d
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov word [ebp - 8], ax
mov byte [ebp - 6], al
jmp 0x40b973
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea ecx, [ebp - 0x10]
push 0xb
push ecx
call edi
add esp, 0x10
mov edx, dword [0x424eec]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
xor ebx, ebx
lea ecx, [ebp - 0x8ea]
lea edi, [ebp - 0x3c]
mov byte [ebp - 0x968], 0
mov dword [ebp - 0x980], ebx
mov dword [ebp - 0x984], ecx
mov dword [ebp - 0x960], edi
cmp byte [edi], 0
je 0x40bd78
push edi
push esi
push str.SELECT_cLevel_Class_Inventory_CtlCode_ResetCount_MasterResetCount_FROM_Character_WHERE_AccountID_s_AND_Name_s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0xc
test al, al
je 0x40bd5d
mov edx, dword [0x424eec]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40bd5d
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dx, word [edi + 8]
mov dword [ebp - 0x957], eax
mov al, byte [edi + 0xa]
push str.cLevel
mov byte [ebp - 0x958], bl
mov dword [ebp - 0x953], ecx
mov word [ebp - 0x94f], dx
mov byte [ebp - 0x94d], al
call fcn.00417950
mov esi, dword [sym.imp.MSVCR100.dll_atoi]
cmp eax, 0xffffffff
jne 0x40ba32
or eax, eax
jmp 0x40ba40
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.Class
mov word [ebp - 0x94c], ax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40ba5a
or eax, eax
jmp 0x40ba68
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.Inventory
mov byte [ebp - 0x94a], al
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40ba95
push 0xc0
lea ecx, [ebp - 0x100]
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
jmp 0x40baae
shl eax, 0xd
add eax, 0x425b0e
push eax
mov ebx, 0xc0
lea edi, [ebp - 0x100]
call fcn.00417ab0
push str.CtlCode
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40bac1
or eax, eax
jmp 0x40bacf
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.ResetCount
mov byte [ebp - 0x949], al
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40bae8
or eax, eax
jmp 0x40baf6
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
push str.MasterResetCount
mov dword [ebp - 0x908], eax
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40bb0f
or eax, eax
jmp 0x40bb1d
shl eax, 0xd
add eax, 0x425b0e
push eax
call esi
add esp, 4
mov edx, dword [0x424eec]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push edx
mov dword [ebp - 0x904], eax
call edi
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x3c
mov ebx, 0xff
lea ecx, [ebp - 0x948]
push ebx
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x947]
lea ecx, [ebp - 0x100]
mov esi, 3
mov dl, byte [ecx]
cmp dl, bl
jne 0x40bb8d
test byte [ecx + 7], 0x80
je 0x40bb8d
mov dl, byte [ecx + 9]
and dl, 0xf0
cmp dl, 0xf0
jne 0x40bb8b
mov dword [eax - 1], 0xffffffff
mov byte [eax + 3], bl
jmp 0x40bbab
mov dl, byte [ecx]
mov byte [eax - 1], dl
movzx edx, byte [ecx + 1]
mov byte [eax], dl
movzx edx, byte [ecx + 7]
mov byte [eax + 1], dl
movzx edx, byte [ecx + 8]
mov byte [eax + 2], dl
movzx edx, byte [ecx + 9]
mov byte [eax + 3], dl
mov dl, byte [ecx + 0x10]
cmp dl, bl
jne 0x40bbd2
test byte [ecx + 0x17], 0x80
je 0x40bbd2
mov dl, byte [ecx + 0x19]
and dl, 0xf0
cmp dl, 0xf0
jne 0x40bbcf
mov dword [eax + 4], 0xffffffff
mov byte [eax + 8], bl
jmp 0x40bbf1
mov dl, byte [ecx + 0x10]
mov byte [eax + 4], dl
movzx edx, byte [ecx + 0x11]
mov byte [eax + 5], dl
movzx edx, byte [ecx + 0x17]
mov byte [eax + 6], dl
movzx edx, byte [ecx + 0x18]
mov byte [eax + 7], dl
movzx edx, byte [ecx + 0x19]
mov byte [eax + 8], dl
mov dl, byte [ecx + 0x20]
cmp dl, bl
jne 0x40bc18
test byte [ecx + 0x27], 0x80
je 0x40bc18
mov dl, byte [ecx + 0x29]
and dl, 0xf0
cmp dl, 0xf0
jne 0x40bc15
mov dword [eax + 9], 0xffffffff
mov byte [eax + 0xd], bl
jmp 0x40bc37
mov dl, byte [ecx + 0x20]
mov byte [eax + 9], dl
movzx edx, byte [ecx + 0x21]
mov byte [eax + 0xa], dl
movzx edx, byte [ecx + 0x27]
mov byte [eax + 0xb], dl
movzx edx, byte [ecx + 0x28]
mov byte [eax + 0xc], dl
movzx edx, byte [ecx + 0x29]
mov byte [eax + 0xd], dl
mov dl, byte [ecx + 0x30]
cmp dl, bl
jne 0x40bc60
test byte [ecx + 0x37], 0x80
je 0x40bc60
mov bl, byte [ecx + 0x39]
and bl, 0xf0
cmp bl, 0xf0
mov ebx, 0xff
jne 0x40bc60
mov dword [eax + 0xe], 0xffffffff
mov byte [eax + 0x12], bl
jmp 0x40bc7f
mov byte [eax + 0xe], dl
movzx edx, byte [ecx + 0x31]
mov byte [eax + 0xf], dl
movzx edx, byte [ecx + 0x37]
mov byte [eax + 0x10], dl
movzx edx, byte [ecx + 0x38]
mov byte [eax + 0x11], dl
movzx edx, byte [ecx + 0x39]
mov byte [eax + 0x12], dl
add ecx, 0x40
add eax, 0x14
dec esi
jne 0x40bb68
mov eax, dword [ebp - 0x960]
push eax
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 8
test al, al
je 0x40bd00
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40bd00
push str.G_Status
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40bccf
or eax, eax
jmp 0x40bce1
shl eax, 0xd
add eax, 0x425b0e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov edx, dword [0x424eec]
push edx
mov byte [ebp - 0x90c], al
call edi
mov eax, dword [0x424eec]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40bd1e
mov ecx, dword [0x424eec]
push ecx
call edi
mov edx, dword [0x424eec]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x90c], bl
mov eax, dword [ebp - 0x984]
add dword [ebp - 0x964], 0x58
mov ebx, dword [ebp - 0x980]
mov edi, eax
mov ecx, 0x16
lea esi, [ebp - 0x958]
add eax, 0x58
inc byte [ebp - 0x968]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x988]
mov edi, dword [ebp - 0x960]
mov dword [ebp - 0x984], eax
jmp 0x40bd78
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x424eec]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
inc ebx
add edi, 0xb
mov dword [ebp - 0x980], ebx
mov dword [ebp - 0x960], edi
cmp ebx, 5
jl 0x40b9b2
mov ebx, dword [ebp - 0x964]
mov ecx, dword [ebp - 0x978]
mov edx, ebx
shr edx, 8
mov byte [ebp - 0x97b], dl
mov edx, dword [ebp - 0x974]
mov byte [ebp - 0x97a], bl
mov eax, dword [ebp - 0x97c]
mov dword [ebp - 0x900], eax
mov eax, dword [ebp - 0x970]
mov dword [ebp - 0x8fc], ecx
mov ecx, dword [ebp - 0x96c]
mov dword [ebp - 0x8f4], eax
lea eax, [ebp - 0x900]
mov dword [ebp - 0x8f0], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x8f8], edx
mov dx, word [ebp - 0x968]
push eax
push ecx
mov word [ebp - 0x8ec], dx
call fcn.004198e0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret