Function at 0x40f940
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb1c
mov eax, dword [0x446040]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ecx + 4]
xorps xmm0, xmm0
push ebx
movups xmmword [ebp - 0xb0f], xmm0
push esi
movq xmm0, qword [ecx + 6]
mov dword [ebp - 0xaf0], ecx
add ecx, 6
push edi
mov word [ebp - 0xb0c], ax
push ecx
movzx eax, word [ecx + 8]
mov word [ebp - 0xb02], ax
mov al, byte [ecx + 0xa]
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
push 0x446e50
mov dword [ebp - 0xb1c], edx
mov dword [ebp - 0xaff], 0
mov byte [ebp - 0xafb], 0
mov byte [ebp - 0xb10], 0xc2
mov byte [ebp - 0xb0d], 1
mov dword [ebp - 0xae8], 0x16
mov dword [ebp - 0xaec], ecx
movq qword [ebp - 0xb0a], xmm0
mov byte [ebp - 0xb00], al
call fcn.0041ad00
mov ebx, dword [sym.imp.ODBC32.dll_SQLFetch]
add esp, 0xc
mov dword [ebp - 0xae4], ebx
test al, al
je 0x40fa1d
push dword [0x446e5c]
call ebx
cmp ax, 0x64
je 0x40fa1d
push dword [0x446e5c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0xaf4], esi
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov dword [ebp - 0xaf8], edi
jmp 0x40fa67
push dword [0x446e5c]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0xaf4], esi
call esi
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x446e5c]
mov dword [ebp - 0xaf8], edi
call edi
push dword [ebp - 0xaec]
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
push 0x446e50
call fcn.0041ad00
add esp, 0xc
push dword [0x446e5c]
call esi
push 2
push dword [0x446e5c]
call edi
push 0x6e
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.0041f470
add esp, 0xc
push dword [ebp - 0xaec]
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x446e50
call fcn.0041ad00
add esp, 0xc
push dword [0x446e5c]
call ebx
push str.MoveCnt
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fab4
or eax, eax
jmp 0x40fac5
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ExtClass
mov byte [ebp - 0xaff], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fade
or eax, eax
jmp 0x40faef
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ExtWarehouse
mov byte [ebp - 0xafe], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fb08
or eax, eax
jmp 0x40fb19
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.GameID1
mov byte [ebp - 0xafd], al
call fcn.0041af50
cmp eax, 0xffffffff
je 0x40fb47
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x78]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID2
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fb6a
xorps xmm0, xmm0
mov word [ebp - 0x65], 0
movq qword [ebp - 0x6d], xmm0
mov byte [ebp - 0x63], 0
jmp 0x40fb83
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x6d]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID3
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fba6
xorps xmm0, xmm0
mov word [ebp - 0x5a], 0
movq qword [ebp - 0x62], xmm0
mov byte [ebp - 0x58], 0
jmp 0x40fbbf
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x62]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID4
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fbe2
xorps xmm0, xmm0
mov word [ebp - 0x4f], 0
movq qword [ebp - 0x57], xmm0
mov byte [ebp - 0x4d], 0
jmp 0x40fbfb
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x57]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID5
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fc1e
xorps xmm0, xmm0
mov word [ebp - 0x44], 0
movq qword [ebp - 0x4c], xmm0
mov byte [ebp - 0x42], 0
jmp 0x40fc37
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x4c]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID6
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fc5a
xorps xmm0, xmm0
mov word [ebp - 0x39], 0
movq qword [ebp - 0x41], xmm0
mov byte [ebp - 0x37], 0
jmp 0x40fc73
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x41]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID7
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fc96
xorps xmm0, xmm0
mov word [ebp - 0x2e], 0
movq qword [ebp - 0x36], xmm0
mov byte [ebp - 0x2c], 0
jmp 0x40fcaf
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x36]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID8
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fcd2
xorps xmm0, xmm0
mov word [ebp - 0x23], 0
movq qword [ebp - 0x2b], xmm0
mov byte [ebp - 0x21], 0
jmp 0x40fceb
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x2b]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID9
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fd0e
xorps xmm0, xmm0
mov word [ebp - 0x18], 0
movq qword [ebp - 0x20], xmm0
mov byte [ebp - 0x16], 0
jmp 0x40fd27
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x20]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push str.GameID10
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fd4a
xorps xmm0, xmm0
mov word [ebp - 0xd], 0
movq qword [ebp - 0x15], xmm0
mov byte [ebp - 0xb], 0
jmp 0x40fd63
shl eax, 0xd
push 0xa
add eax, 0x447a7e
push eax
lea eax, [ebp - 0x15]
push 0xb
push eax
call fcn.0042750d
add esp, 0x10
push dword [0x446e5c]
call esi
push 2
push dword [0x446e5c]
call edi
xor al, al
mov dword [ebp - 0xad8], 0xff
push 0x13c
mov byte [ebp - 0xad9], al
mov byte [ebp - 0xafc], al
lea eax, [ebp - 0xad4]
push 0
push eax
call fcn.0041f470
add esp, 0xc
lea ecx, [ebp - 0x922]
xor eax, eax
mov dword [ebp - 0xb14], ecx
lea ebx, [ebp - 0x78]
mov dword [ebp - 0xae0], eax
mov dword [ebp - 0xb18], ebx
cmp byte [ebx], 0
je 0x4101f2
push ebx
push dword [ebp - 0xaec]
push str.SELECT_cLevel_Class_Inventory_CtlCode_ResetCount_MasterResetCount_FROM_Character_WHERE_AccountID_s_AND_Name_s
push 0x446e50
call fcn.0041ad00
add esp, 0x10
test al, al
je 0x4101da
push dword [0x446e5c]
call dword [ebp - 0xae4]
cmp ax, 0x64
je 0x4101da
mov eax, dword [ebp - 0xae0]
movq xmm0, qword [ebx]
mov byte [ebp - 0x998], al
mov ax, word [ebx + 8]
mov word [ebp - 0x98f], ax
mov al, byte [ebx + 0xa]
push str.cLevel
movq qword [ebp - 0x997], xmm0
mov byte [ebp - 0x98d], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fe3f
or eax, eax
jmp 0x40fe50
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.Class
mov word [ebp - 0x98c], ax
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fe6a
or eax, eax
jmp 0x40fe7b
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
mov byte [ebp - 0x98a], al
lea eax, [ebp - 0x138]
push 0xc0
push eax
push str.Inventory
call fcn.0041afa0
push str.CtlCode
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40feaa
or eax, eax
jmp 0x40febb
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ResetCount
mov byte [ebp - 0x989], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fed4
or eax, eax
jmp 0x40fee5
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.MasterResetCount
mov dword [ebp - 0x948], eax
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x40fefe
or eax, eax
jmp 0x40ff0f
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push dword [0x446e5c]
mov dword [ebp - 0x944], eax
call esi
push 2
push dword [0x446e5c]
call edi
push 0x3c
lea eax, [ebp - 0x988]
push 0xff
push eax
call fcn.0041f470
add esp, 0xc
lea esi, [ebp - 0x987]
xor edi, edi
lea edx, [ebp - 0x131]
nop dword [eax + eax]
mov cl, byte [edx - 7]
cmp cl, 0xff
jne 0x40ff72
cmp byte [edx], 0
jge 0x40ff72
mov al, byte [edx + 2]
and al, 0xf0
cmp al, 0xf0
jne 0x40ff72
or al, cl
or bl, cl
or ah, cl
or ch, cl
or cl, cl
jmp 0x40ff7d
mov al, byte [edx + 2]
mov bl, byte [edx + 1]
mov ah, byte [edx]
mov ch, byte [edx - 6]
mov byte [esi - 1], cl
mov byte [esi], ch
mov byte [esi + 1], ah
mov byte [esi + 2], bl
mov byte [esi + 3], al
cmp edi, 7
ja 0x40ffbf
movzx ecx, byte [edx - 4]
movzx eax, byte [edx - 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx - 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx - 1]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp - 0xae0]
lea eax, [edi + eax*8]
mov dword [ebp + eax*4 - 0xad8], ecx
inc edi
add esi, 5
add edx, 0x10
cmp edi, 0xc
jl 0x40ff50
mov ebx, dword [ebp - 0xb18]
push ebx
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
push 0x446e50
call fcn.0041ad00
add esp, 0xc
test al, al
je 0x410044
push dword [0x446e5c]
call dword [ebp - 0xae4]
cmp ax, 0x64
je 0x410044
push str.G_Status
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x41000d
or eax, eax
jmp 0x41001e
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push dword [0x446e5c]
mov esi, dword [ebp - 0xaf4]
mov byte [ebp - 0x94c], al
call esi
mov edi, dword [ebp - 0xaf8]
push 2
push dword [0x446e5c]
call edi
jmp 0x410069
push dword [0x446e5c]
mov esi, dword [ebp - 0xaf4]
call esi
mov edi, dword [ebp - 0xaf8]
push 2
push dword [0x446e5c]
call edi
mov byte [ebp - 0x94c], 0xff
xor eax, eax
mov word [ebp - 0x940], ax
mov eax, dword [ebp - 0xaf0]
cmp byte [eax + 0x11], 1
jne 0x4100ea
push ebx
push str.SELECT_MasterLevel_FROM_MasterSkillTree_WHERE_Name_s
push 0x446e50
call fcn.0041ad00
add esp, 0xc
test al, al
je 0x4100d2
push dword [0x446e5c]
call dword [ebp - 0xae4]
cmp ax, 0x64
je 0x4100d2
push str.MasterLevel
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x4100ba
or eax, eax
jmp 0x4100cb
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
mov word [ebp - 0x940], ax
push dword [0x446e5c]
call esi
push 2
push dword [0x446e5c]
call edi
mov eax, dword [ebp - 0xaf0]
cmp byte [eax + 0x11], 1
mov dword [ebp - 0x93c], 0
jne 0x41015f
push ebx
push str.SELECT_Quest_FROM_CustomQuest_WHERE_Name_s
push 0x446e50
call fcn.0041ad00
add esp, 0xc
test al, al
je 0x41014d
push dword [0x446e5c]
call dword [ebp - 0xae4]
cmp ax, 0x64
je 0x41014d
push str.Quest
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x410136
or eax, eax
jmp 0x410147
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
mov dword [ebp - 0x93c], eax
push dword [0x446e5c]
call esi
push 2
push dword [0x446e5c]
call edi
mov ecx, dword [ebp - 0xb14]
movups xmm0, xmmword [ebp - 0x998]
mov edx, dword [ebp - 0xae8]
mov al, byte [ebp - 0xad9]
add edx, 0x60
movups xmmword [ecx], xmm0
mov dword [ebp - 0xae8], edx
movups xmm0, xmmword [ebp - 0x988]
movups xmmword [ecx + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x978]
movups xmmword [ecx + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x968]
movups xmmword [ecx + 0x30], xmm0
movups xmm0, xmmword [ebp - 0x958]
movups xmmword [ecx + 0x40], xmm0
movups xmm0, xmmword [ebp - 0x948]
movups xmmword [ecx + 0x50], xmm0
add ecx, 0x60
inc al
mov byte [ebp - 0xad9], al
mov byte [ebp - 0xafc], al
mov eax, dword [ebp - 0xae0]
mov dword [ebp - 0xb14], ecx
jmp 0x4101f8
push dword [0x446e5c]
call esi
push 2
push dword [0x446e5c]
call edi
mov eax, dword [ebp - 0xae0]
mov edx, dword [ebp - 0xae8]
inc eax
add ebx, 0xb
mov dword [ebp - 0xae0], eax
mov dword [ebp - 0xb18], ebx
cmp eax, 0xa
jl 0x40fdc0
mov ebx, dword [ebp - 0xb1c]
mov eax, edx
shr eax, 8
mov byte [ebp - 0xb0f], al
mov eax, dword [ebp - 0xb00]
mov dword [ebp - 0x928], eax
mov ax, word [ebp - 0xafc]
mov word [ebp - 0x924], ax
lea eax, [ebp - 0x938]
push edx
mov byte [ebp - 0xb0e], dl
movups xmm0, xmmword [ebp - 0xb10]
push eax
push ebx
movups xmmword [ebp - 0x938], xmm0
call fcn.0041c330
mov eax, dword [ebp - 0xaf0]
lea esi, [ebp - 0xad8]
sub esp, 0x140
mov ecx, 0x50
mov edi, esp
rep movsd dword es:[edi], dword [esi]
movzx edx, word [eax + 4]
mov ecx, ebx
push dword [ebp - 0xaec]
call fcn.00415ca0
mov ecx, dword [ebp - 4]
add esp, 0x144
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0041dc5d
mov esp, ebp
pop ebp
ret