Function at 0x407e20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x978
mov eax, dword [0x41f018]
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 - 0x968], cx
movzx ecx, word [esi + 8]
push edi
mov dword [ebp - 0x966], edx
mov dl, byte [esi + 0xa]
mov word [ebp - 0x95e], cx
push esi
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x4eb8c0
mov byte [ebp - 0x96c], 0xc2
mov byte [ebp - 0x969], 1
mov dword [ebp - 0x958], 0x14
mov dword [ebp - 0x978], esi
mov dword [ebp - 0x962], eax
mov byte [ebp - 0x95c], dl
call fcn.00412e90
add esp, 8
test al, al
je 0x407ed2
mov eax, dword [0x4eb8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x407ed2
mov ecx, dword [0x4eb8cc]
push ecx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x4eb8cc]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x407f17
mov eax, dword [0x4eb8cc]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call ebx
mov ecx, dword [0x4eb8cc]
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push ecx
call edi
push esi
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
mov ecx, 0x4eb8c0
call fcn.00412e90
mov edx, dword [0x4eb8cc]
add esp, 8
push edx
call ebx
mov eax, dword [0x4eb8cc]
push 2
push eax
call edi
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, 0x4eb8c0
call fcn.00412e90
mov edx, dword [0x4eb8cc]
add esp, 0x14
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
push str.MoveCnt
mov ebx, 0x4eb8c0
call fcn.00413050
push str.ExtClass
mov byte [ebp - 0x95b], al
call fcn.00413050
mov byte [ebp - 0x95a], al
push 0xb
lea eax, [ebp - 0x3c]
push eax
push str.GameID1
call fcn.004131c0
push 0xb
lea ecx, [ebp - 0x31]
push ecx
push str.GameID2
call fcn.004131c0
push 0xb
lea edx, [ebp - 0x26]
push edx
push str.GameID3
call fcn.004131c0
push 0xb
lea eax, [ebp - 0x1b]
push eax
push str.GameID4
call fcn.004131c0
push 0xb
lea ecx, [ebp - 0x10]
push ecx
push str.GameID5
call fcn.004131c0
mov edx, dword [0x4eb8cc]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x4eb8cc]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
xor ebx, ebx
lea ecx, [ebp - 0x8e8]
lea edi, [ebp - 0x3c]
mov byte [ebp - 0x959], 0
mov dword [ebp - 0x974], ebx
mov dword [ebp - 0x954], ecx
mov dword [ebp - 0x970], edi
jmp 0x408000
cmp byte [edi], 0
je 0x4082f6
push edi
push esi
push str.SELECT_cLevel_Class_Inventory_CtlCode_FROM_Character_WHERE_AccountID_s_AND_Name_s
mov ecx, 0x4eb8c0
call fcn.00412e90
add esp, 0xc
test al, al
je 0x4082db
mov edx, dword [0x4eb8cc]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4082db
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dx, word [edi + 8]
mov dword [ebp - 0x94b], eax
mov al, byte [edi + 0xa]
mov byte [ebp - 0x94c], bl
push str.cLevel
mov ebx, 0x4eb8c0
mov dword [ebp - 0x947], ecx
mov word [ebp - 0x943], dx
mov byte [ebp - 0x941], al
call fcn.00413050
push str.Class
mov word [ebp - 0x940], ax
call fcn.00413050
push 0xc0
lea ecx, [ebp - 0xfc]
push ecx
push str.Inventory
mov byte [ebp - 0x93e], al
call fcn.00413250
push str.CtlCode
call fcn.00413050
mov edx, dword [0x4eb8cc]
push edx
mov byte [ebp - 0x93d], al
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x4eb8cc]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x3c
mov ebx, 0xff
lea ecx, [ebp - 0x93c]
push ebx
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x93b]
lea ecx, [ebp - 0xfc]
mov esi, 3
mov dl, byte [ecx]
cmp dl, bl
jne 0x40811b
test byte [ecx + 7], 0x80
je 0x40811b
mov dl, byte [ecx + 9]
and dl, 0xf0
cmp dl, 0xf0
jne 0x408119
mov dword [eax - 1], 0xffffffff
mov byte [eax + 3], bl
jmp 0x408139
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 0x408162
test byte [ecx + 0x17], 0x80
je 0x408162
mov bl, byte [ecx + 0x19]
and bl, 0xf0
cmp bl, 0xf0
mov ebx, 0xff
jne 0x408162
mov dword [eax + 4], 0xffffffff
mov byte [eax + 8], bl
jmp 0x408181
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 0x4081aa
test byte [ecx + 0x27], 0x80
je 0x4081aa
mov bl, byte [ecx + 0x29]
and bl, 0xf0
cmp bl, 0xf0
mov ebx, 0xff
jne 0x4081aa
mov dword [eax + 9], 0xffffffff
mov byte [eax + 0xd], bl
jmp 0x4081c9
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 0x4081f2
test byte [ecx + 0x37], 0x80
je 0x4081f2
mov bl, byte [ecx + 0x39]
and bl, 0xf0
cmp bl, 0xf0
mov ebx, 0xff
jne 0x4081f2
mov dword [eax + 0xe], 0xffffffff
mov byte [eax + 0x12], bl
jmp 0x408211
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 0x4080f6
push edi
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
mov ecx, 0x4eb8c0
call fcn.00412e90
add esp, 8
test al, al
je 0x40827a
mov eax, dword [0x4eb8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40827a
push str.G_Status
mov ebx, 0x4eb8c0
call fcn.00413050
mov ecx, dword [0x4eb8cc]
push ecx
mov byte [ebp - 0x900], al
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x4eb8cc]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40829b
mov eax, dword [0x4eb8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x4eb8cc]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x900], bl
mov edi, dword [ebp - 0x954]
mov ebx, dword [ebp - 0x974]
mov ecx, 0x13
lea esi, [ebp - 0x94c]
rep movsd dword es:[edi], dword [esi]
mov eax, 0x4e
add dword [ebp - 0x958], eax
add dword [ebp - 0x954], eax
inc byte [ebp - 0x959]
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x978]
mov edi, dword [ebp - 0x970]
jmp 0x4082f6
mov edx, dword [0x4eb8cc]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x4eb8cc]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
inc ebx
add edi, 0xb
mov dword [ebp - 0x974], ebx
mov dword [ebp - 0x970], edi
cmp ebx, 5
jl 0x408000
mov ebx, dword [ebp - 0x958]
mov eax, dword [ebp - 0x968]
mov ecx, ebx
shr ecx, 8
mov byte [ebp - 0x96b], cl
mov ecx, dword [ebp - 0x964]
mov byte [ebp - 0x96a], bl
mov edx, dword [ebp - 0x96c]
mov dword [ebp - 0x8fc], edx
mov edx, dword [ebp - 0x960]
mov dword [ebp - 0x8f4], ecx
lea ecx, [ebp - 0x8fc]
mov dword [ebp - 0x8f0], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x8f8], eax
mov eax, dword [ebp - 0x95c]
push ecx
push edx
mov dword [ebp - 0x8ec], eax
call fcn.00414a90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415bda
mov esp, ebp
pop ebp
ret