Function at 0x408010
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x978
mov eax, dword [0x41d018]
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, 0x41ee38
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.00412310
add esp, 8
test al, al
je 0x4080c2
mov eax, dword [0x41ee44]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4080c2
mov ecx, dword [0x41ee44]
push ecx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x41ee44]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x408107
mov eax, dword [0x41ee44]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call edi
mov ecx, dword [0x41ee44]
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, 0x41ee38
call fcn.00412310
mov edx, dword [0x41ee44]
add esp, 8
push edx
call edi
mov eax, dword [0x41ee44]
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, 0x41ee38
call fcn.00412310
mov edx, dword [0x41ee44]
add esp, 0x14
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
push str.MoveCnt
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x408147
or eax, eax
jmp 0x408159
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push str.ExtClass
mov byte [ebp - 0x95b], al
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x408172
or eax, eax
jmp 0x408184
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push str.GameID1
mov byte [ebp - 0x95a], al
call fcn.004124d0
mov edi, dword [sym.imp.MSVCR100.dll_strncpy_s]
cmp eax, 0xffffffff
jne 0x4081b0
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov word [ebp - 0x34], ax
mov byte [ebp - 0x32], al
jmp 0x4081c6
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea eax, [ebp - 0x3c]
push 0xb
push eax
call edi
add esp, 0x10
push str.GameID2
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x4081e6
xor eax, eax
mov dword [ebp - 0x31], eax
mov dword [ebp - 0x2d], eax
mov word [ebp - 0x29], ax
mov byte [ebp - 0x27], al
jmp 0x4081fc
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea ecx, [ebp - 0x31]
push 0xb
push ecx
call edi
add esp, 0x10
push str.GameID3
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40821c
xor eax, eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov word [ebp - 0x1e], ax
mov byte [ebp - 0x1c], al
jmp 0x408232
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea edx, [ebp - 0x26]
push 0xb
push edx
call edi
add esp, 0x10
push str.GameID4
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x408252
xor eax, eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
jmp 0x408268
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea eax, [ebp - 0x1b]
push 0xb
push eax
call edi
add esp, 0x10
push str.GameID5
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x408288
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov word [ebp - 8], ax
mov byte [ebp - 6], al
jmp 0x40829e
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea ecx, [ebp - 0x10]
push 0xb
push ecx
call edi
add esp, 0x10
mov edx, dword [0x41ee44]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x41ee44]
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 - 0x970], ebx
mov dword [ebp - 0x974], ecx
mov dword [ebp - 0x954], edi
lea ecx, [ecx]
cmp byte [edi], 0
je 0x40865a
push edi
push esi
push str.SELECT_cLevel_Class_Inventory_CtlCode_FROM_Character_WHERE_AccountID_s_AND_Name_s
mov ecx, 0x41ee38
call fcn.00412310
add esp, 0xc
test al, al
je 0x40863f
mov edx, dword [0x41ee44]
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40863f
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dx, word [edi + 8]
mov dword [ebp - 0x94b], eax
mov al, byte [edi + 0xa]
push str.cLevel
mov byte [ebp - 0x94c], bl
mov dword [ebp - 0x947], ecx
mov word [ebp - 0x943], dx
mov byte [ebp - 0x941], al
call fcn.004124d0
mov esi, dword [sym.imp.MSVCR100.dll_atoi]
cmp eax, 0xffffffff
jne 0x408360
or eax, eax
jmp 0x40836e
shl eax, 0xd
add eax, 0x41fa66
push eax
call esi
add esp, 4
push str.Class
mov word [ebp - 0x940], ax
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x408388
or eax, eax
jmp 0x408396
shl eax, 0xd
add eax, 0x41fa66
push eax
call esi
add esp, 4
push str.Inventory
mov byte [ebp - 0x93e], al
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x4083c3
push 0xc0
lea ecx, [ebp - 0xfc]
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
jmp 0x4083dc
shl eax, 0xd
add eax, 0x41fa66
push eax
mov ebx, 0xc0
lea edi, [ebp - 0xfc]
call fcn.00412630
push str.CtlCode
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x4083ef
or eax, eax
jmp 0x4083fd
shl eax, 0xd
add eax, 0x41fa66
push eax
call esi
add esp, 4
mov edx, dword [0x41ee44]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push edx
mov byte [ebp - 0x93d], al
call edi
mov eax, dword [0x41ee44]
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 0x40846d
test byte [ecx + 7], 0x80
je 0x40846d
mov dl, byte [ecx + 9]
and dl, 0xf0
cmp dl, 0xf0
jne 0x40846b
mov dword [eax - 1], 0xffffffff
mov byte [eax + 3], bl
jmp 0x40848b
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 0x4084b2
test byte [ecx + 0x17], 0x80
je 0x4084b2
mov dl, byte [ecx + 0x19]
and dl, 0xf0
cmp dl, 0xf0
jne 0x4084af
mov dword [eax + 4], 0xffffffff
mov byte [eax + 8], bl
jmp 0x4084d1
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 0x4084f8
test byte [ecx + 0x27], 0x80
je 0x4084f8
mov dl, byte [ecx + 0x29]
and dl, 0xf0
cmp dl, 0xf0
jne 0x4084f5
mov dword [eax + 9], 0xffffffff
mov byte [eax + 0xd], bl
jmp 0x408517
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 0x408540
test byte [ecx + 0x37], 0x80
je 0x408540
mov bl, byte [ecx + 0x39]
and bl, 0xf0
cmp bl, 0xf0
mov ebx, 0xff
jne 0x408540
mov dword [eax + 0xe], 0xffffffff
mov byte [eax + 0x12], bl
jmp 0x40855f
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 0x408448
mov eax, dword [ebp - 0x954]
push eax
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
mov ecx, 0x41ee38
call fcn.00412310
add esp, 8
test al, al
je 0x4085e0
mov ecx, dword [0x41ee44]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4085e0
push str.G_Status
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x4085af
or eax, eax
jmp 0x4085c1
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov edx, dword [0x41ee44]
push edx
mov byte [ebp - 0x900], al
call edi
mov eax, dword [0x41ee44]
push 2
push eax
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x4085fe
mov ecx, dword [0x41ee44]
push ecx
call edi
mov edx, dword [0x41ee44]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x900], bl
mov eax, dword [ebp - 0x974]
add dword [ebp - 0x958], 0x4e
mov ebx, dword [ebp - 0x970]
mov edi, eax
mov ecx, 0x13
lea esi, [ebp - 0x94c]
rep movsd dword es:[edi], dword [esi]
add eax, 0x4e
inc byte [ebp - 0x959]
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x978]
mov edi, dword [ebp - 0x954]
mov dword [ebp - 0x974], eax
jmp 0x40865a
mov eax, dword [0x41ee44]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
inc ebx
add edi, 0xb
mov dword [ebp - 0x970], ebx
mov dword [ebp - 0x954], edi
cmp ebx, 5
jl 0x4082e0
mov ebx, dword [ebp - 0x958]
mov ecx, dword [ebp - 0x968]
mov edx, ebx
shr edx, 8
mov byte [ebp - 0x96b], dl
mov edx, dword [ebp - 0x964]
mov byte [ebp - 0x96a], bl
mov eax, dword [ebp - 0x96c]
mov dword [ebp - 0x8fc], eax
mov eax, dword [ebp - 0x960]
mov dword [ebp - 0x8f4], edx
lea edx, [ebp - 0x8fc]
mov dword [ebp - 0x8f0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x8f8], ecx
mov ecx, dword [ebp - 0x95c]
push edx
push eax
mov dword [ebp - 0x8ec], ecx
call fcn.00413de0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415636
mov esp, ebp
pop ebp
ret