Function at 0x40be20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x424018]
xor eax, ebp
mov dword [ebp - 4], eax
mov ax, word [edx + 4]
mov ecx, dword [edx + 6]
push ebx
push esi
push edi
lea edi, [edx + 6]
mov word [ebp - 0x7c], ax
mov eax, dword [edi + 4]
mov dword [ebp - 0x7a], ecx
movzx ecx, word [edi + 8]
mov dword [ebp - 0x76], eax
movzx eax, byte [edi + 0xa]
lea esi, [edx + 0x11]
mov word [ebp - 0x72], cx
mov ecx, dword [esi]
mov byte [ebp - 0x70], al
mov eax, dword [esi + 4]
mov dword [ebp - 0x6f], ecx
movzx ecx, word [esi + 8]
mov dword [ebp - 0x6b], eax
movzx eax, byte [esi + 0xa]
mov word [ebp - 0x67], cx
mov dword [ebp - 0x44], edx
mov word [ebp - 0x80], 0x3ac1
mov byte [ebp - 0x7e], 2
mov dword [ebp - 0x40], edi
mov byte [ebp - 0x65], al
xor ecx, ecx
jmp 0x40be90
mov al, byte [esi + ecx]
cmp al, 0x20
je 0x40bee6
cmp al, 0x22
je 0x40bee6
cmp al, 0x27
je 0x40bee6
inc ecx
cmp ecx, 0xb
jl 0x40be90
mov edi, dword [0x42436c]
cmp edi, dword [0x424370]
je 0x40bed6
mov ebx, dword [sym.imp.MSVCR100.dll_strstr]
lea esp, [esp]
push edi
push esi
call ebx
add esp, 8
test eax, eax
jne 0x40bee0
add edi, 0x20
cmp edi, dword [0x424370]
jne 0x40bec0
mov edx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
mov bl, 1
jmp 0x40bee8
mov edx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
xor bl, bl
mov cl, byte [edx + 0x1c]
or eax, 0xffffffff
push 0x36
mov dword [ebp - 0x61], eax
mov dword [ebp - 0x5d], eax
mov dword [ebp - 0x59], eax
mov dword [ebp - 0x55], eax
mov dword [ebp - 0x51], eax
mov dword [ebp - 0x4d], eax
lea eax, [ebp - 0x3b]
mov edx, 1
push 0
push eax
mov byte [ebp - 0x63], 0
mov byte [ebp - 0x62], cl
mov word [ebp - 0x48], dx
mov byte [ebp - 0x3c], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
test bl, bl
je 0x40c127
push edi
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 8
test al, al
je 0x40c127
mov ecx, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFetch]
push ecx
call ebx
cmp ax, 0x64
je 0x40c127
push str.GameID1
call fcn.00417950
mov edi, dword [sym.imp.MSVCR100.dll_strncpy_s]
cmp eax, 0xffffffff
jne 0x40bf86
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov word [ebp - 0x34], ax
mov byte [ebp - 0x32], al
jmp 0x40bf9c
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea edx, [ebp - 0x3c]
push 0xb
push edx
call edi
add esp, 0x10
push str.GameID2
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40bfbc
xor eax, eax
mov dword [ebp - 0x31], eax
mov dword [ebp - 0x2d], eax
mov word [ebp - 0x29], ax
mov byte [ebp - 0x27], al
jmp 0x40bfd2
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea eax, [ebp - 0x31]
push 0xb
push eax
call edi
add esp, 0x10
push str.GameID3
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40bff2
xor eax, eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov word [ebp - 0x1e], ax
mov byte [ebp - 0x1c], al
jmp 0x40c008
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea ecx, [ebp - 0x26]
push 0xb
push ecx
call edi
add esp, 0x10
push str.GameID4
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40c028
xor eax, eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
jmp 0x40c03e
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea edx, [ebp - 0x1b]
push 0xb
push edx
call edi
add esp, 0x10
push str.GameID5
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40c05e
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov word [ebp - 8], ax
mov byte [ebp - 6], al
jmp 0x40c074
shl eax, 0xd
push 0xa
add eax, 0x425b0e
push eax
lea eax, [ebp - 0x10]
push 0xb
push eax
call edi
add esp, 0x10
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]
lea eax, [ebp - 0x63]
push eax
push 0x41ea56
lea eax, [ebp - 0x3c]
call fcn.0041a340
add esp, 8
test al, al
jne 0x40c0b1
mov byte [ebp - 0x64], 2
jmp 0x40c146
mov ecx, dword [ebp - 0x44]
movzx edx, byte [ecx + 0x1c]
mov edi, dword [ebp - 0x40]
push edx
push esi
push edi
push str.EXEC_WZ_CreateCharacter__s__s__d
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0x10
test al, al
je 0x40c120
mov eax, dword [0x424eec]
push eax
call ebx
cmp ax, 0x64
je 0x40c120
push 0x425b0e
call dword [sym.imp.MSVCR100.dll_atoi]
mov bl, al
add esp, 4
mov byte [ebp - 0x64], bl
call fcn.00417930
cmp bl, 1
jne 0x40c146
movzx ecx, byte [ebp - 0x63]
push edi
inc ecx
push esi
push ecx
push str.UPDATE_AccountCharacter_SET_GameID_d_s_WHERE_Id_s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0x10
call fcn.00417930
jmp 0x40c146
call fcn.00417930
jmp 0x40c142
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]
mov byte [ebp - 0x64], 0
mov edx, dword [ebp + 8]
movzx ebx, byte [ebp - 0x7f]
lea ecx, [ebp - 0x80]
push ecx
push edx
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