Function at 0x40dc00
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x44000c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x170], edx
lea edx, [ebx + 0x11]
mov dword [ebp - 0x124], ebx
push esi
push edi
movzx eax, word [ebx + 4]
movq xmm0, qword [ebx + 6]
mov word [ebp - 0x168], ax
movzx eax, word [ebx + 0xe]
mov word [ebp - 0x15e], ax
mov al, byte [ebx + 0x10]
mov byte [ebp - 0x15c], al
movzx eax, word [edx + 8]
mov word [ebp - 0x153], ax
mov al, byte [edx + 0xa]
movq qword [ebp - 0x166], xmm0
movq xmm0, qword [edx]
mov byte [ebp - 0x151], al
xor eax, eax
mov word [ebp - 0x16c], 0x3ac1
mov byte [ebp - 0x16a], 2
mov dword [ebp - 0x128], edx
movq qword [ebp - 0x15b], xmm0
nop dword [eax + eax]
mov cl, byte [edx + eax]
cmp cl, 0x20
je 0x40dcd9
cmp cl, 0x22
je 0x40dcd9
cmp cl, 0x27
je 0x40dcd9
inc eax
cmp eax, 0xb
jl 0x40dc90
mov esi, dword [0x440a40]
cmp esi, dword [0x440a44]
je 0x40dcd5
push esi
push edx
call fcn.0041ac30
add esp, 8
test eax, eax
jne 0x40dcd9
mov edx, dword [ebp - 0x128]
add esi, 0x20
cmp esi, dword [0x440a44]
jne 0x40dcb6
mov cl, 1
jmp 0x40dcdb
xor cl, cl
mov al, byte [ebx + 0x1c]
lea edi, [ebp - 0xd3]
movaps xmm0, xmmword [0x43cb60]
mov byte [ebp - 0x14e], al
mov eax, 1
mov word [ebp - 0x134], ax
or eax, 0xffffffff
mov dword [ebp - 0x130], eax
mov eax, 1
mov byte [ebp - 0x150], cl
mov byte [ebp - 0x14f], 0
movups xmmword [ebp - 0x14d], xmm0
mov dword [ebp - 0x12c], eax
movq qword [ebp - 0x13d], xmm0
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
test cl, cl
je 0x40dea1
mov ecx, dword [ebp - 0x124]
inc eax
add ecx, 6
push ecx
push eax
push str.SELECT__FROM_AccountCharacter_d_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0x10
test al, al
je 0x40dea1
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40dea1
push str.GameID1
call fcn.004167c0
lea ecx, [edi - 0x16]
cmp eax, 0xffffffff
jne 0x40dda2
xorps xmm0, xmm0
movq qword [ecx], xmm0
mov word [ecx + 8], 0
mov byte [ecx + 0xa], 0
jmp 0x40ddb8
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
push 0xb
push ecx
call fcn.00422930
add esp, 0x10
push str.GameID2
call fcn.004167c0
lea ecx, [edi - 0xb]
cmp eax, 0xffffffff
jne 0x40dddd
xorps xmm0, xmm0
movq qword [ecx], xmm0
mov word [ecx + 8], 0
mov byte [ecx + 0xa], 0
jmp 0x40ddf3
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
push 0xb
push ecx
call fcn.00422930
add esp, 0x10
push str.GameID3
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40de15
xorps xmm0, xmm0
movq qword [edi], xmm0
mov word [edi + 8], 0
mov byte [edi + 0xa], 0
jmp 0x40de2b
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
push 0xb
push edi
call fcn.00422930
add esp, 0x10
push str.GameID4
call fcn.004167c0
lea ecx, [edi + 0xb]
cmp eax, 0xffffffff
jne 0x40de50
xorps xmm0, xmm0
movq qword [ecx], xmm0
mov word [ecx + 8], 0
mov byte [ecx + 0xa], 0
jmp 0x40de66
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
push 0xb
push ecx
call fcn.00422930
add esp, 0x10
push str.GameID5
call fcn.004167c0
lea ecx, [edi + 0x16]
cmp eax, 0xffffffff
jne 0x40de8b
xorps xmm0, xmm0
movq qword [ecx], xmm0
mov word [ecx + 8], 0
mov byte [ecx + 0xa], 0
jmp 0x40dea1
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
push 0xb
push ecx
call fcn.00422930
add esp, 0x10
push dword [0x440e3c]
call ebx
push 2
push dword [0x440e3c]
call esi
xor ebx, ebx
lea esi, [edi - 0x16]
nop dword [eax + eax]
push 0x4379a2
push esi
call fcn.0041f328
add esp, 8
test eax, eax
je 0x40defb
inc ebx
add esi, 0xb
cmp ebx, 5
jl 0x40dec0
mov eax, dword [ebp - 0x12c]
add edi, 0x37
inc eax
mov dword [ebp - 0x12c], eax
cmp eax, 5
jge 0x40df0d
mov cl, byte [ebp - 0x150]
jmp 0x40dd2d
mov eax, dword [ebp - 0x12c]
mov byte [ebp - 0x14f], bl
mov dword [ebp - 0x130], eax
cmp byte [ebp - 0x150], 0
je 0x40e0bc
mov eax, dword [ebp - 0x124]
add eax, 6
push eax
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0xc
test al, al
je 0x40e0bc
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40e0bc
push str.GameID1
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40df80
xorps xmm0, xmm0
mov word [ebp - 0x118], 0
movq qword [ebp - 0x120], xmm0
mov byte [ebp - 0x116], 0
jmp 0x40df9c
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x120]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID2
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40dfc8
xorps xmm0, xmm0
mov word [ebp - 0x10d], 0
movq qword [ebp - 0x115], xmm0
mov byte [ebp - 0x10b], 0
jmp 0x40dfe4
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x115]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID3
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40e010
xorps xmm0, xmm0
mov word [ebp - 0x102], 0
movq qword [ebp - 0x10a], xmm0
mov byte [ebp - 0x100], 0
jmp 0x40e02c
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0x10a]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID4
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40e058
xorps xmm0, xmm0
mov word [ebp - 0xf7], 0
movq qword [ebp - 0xff], xmm0
mov byte [ebp - 0xf5], 0
jmp 0x40e074
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0xff]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push str.GameID5
call fcn.004167c0
cmp eax, 0xffffffff
jne 0x40e0a0
xorps xmm0, xmm0
mov word [ebp - 0xec], 0
movq qword [ebp - 0xf4], xmm0
mov byte [ebp - 0xea], 0
jmp 0x40e0bc
shl eax, 0xe
push 0xa
add eax, 0x441a62
push eax
lea eax, [ebp - 0xf4]
push 0xb
push eax
call fcn.00422930
add esp, 0x10
push dword [0x440e3c]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call edi
mov eax, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call eax
xor ebx, ebx
lea esi, [ebp - 0x120]
push 0x4379a2
push esi
call fcn.0041f328
add esp, 8
test eax, eax
je 0x40e1ef
inc ebx
add esi, 0xb
cmp ebx, 5
jl 0x40e0e1
mov ecx, dword [ebp - 0x130]
cmp ecx, 0xffffffff
jne 0x40e117
mov byte [ebp - 0x150], 2
jmp 0x40e2c6
test ecx, ecx
je 0x40e1f9
lea eax, [ecx - 1]
cmp eax, 3
ja 0x40e2c6
lea esi, [ecx + 1]
mov ecx, dword [ebp - 0x124]
movzx eax, byte [ecx + 0x1c]
push eax
push dword [ebp - 0x128]
lea eax, [ecx + 6]
push eax
push esi
push str.EXEC_WZ_CreateCharacter_d__s__s__d
push 0x440e30
call fcn.00416550
add esp, 0x18
test al, al
je 0x40e2a9
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40e2a9
push 0x441a62
call fcn.00422137
add esp, 4
mov bl, al
mov byte [ebp - 0x150], bl
push dword [0x440e3c]
call edi
push 2
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp bl, 1
jne 0x40e2c6
mov eax, dword [ebp - 0x124]
add eax, 6
push eax
push dword [ebp - 0x128]
movzx eax, byte [ebp - 0x14f]
inc eax
push eax
push esi
push str.UPDATE_AccountCharacter_d_SET_GameID_d_s_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0x18
push dword [0x440e3c]
call edi
push 2
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40e2c6
mov bh, bl
mov byte [ebp - 0x14f], bh
jmp 0x40e1ff
mov bh, byte [ebp - 0x14f]
mov ecx, dword [ebp - 0x124]
movzx eax, byte [ecx + 0x1c]
push eax
push dword [ebp - 0x128]
lea eax, [ecx + 6]
push eax
push str.EXEC_WZ_CreateCharacter__s__s__d
push 0x440e30
call fcn.00416550
add esp, 0x14
test al, al
je 0x40e2a9
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40e2a9
push 0x441a62
call fcn.00422137
add esp, 4
mov bl, al
mov byte [ebp - 0x150], bl
push dword [0x440e3c]
call edi
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x440e3c]
call esi
cmp bl, 1
jne 0x40e2c6
mov eax, dword [ebp - 0x124]
add eax, 6
push eax
push dword [ebp - 0x128]
movzx eax, bh
inc eax
push eax
push str.UPDATE_AccountCharacter_SET_GameID_d_s_WHERE_Id_s
push 0x440e30
call fcn.00416550
add esp, 0x14
push dword [0x440e3c]
call edi
push 2
push dword [0x440e3c]
call esi
jmp 0x40e2c6
push dword [0x440e3c]
call edi
push 2
push dword [0x440e3c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x150], 0
movzx eax, byte [ebp - 0x16b]
push eax
lea eax, [ebp - 0x16c]
push eax
push dword [ebp - 0x170]
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