Function at 0x408390
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x41f018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
movzx eax, word [esi + 4]
mov ecx, dword [esi + 6]
mov edx, dword [esi + 0xa]
lea ebx, [esi + 6]
mov word [ebp - 0x78], ax
movzx eax, word [ebx + 8]
mov dword [ebp - 0x76], ecx
mov cl, byte [ebx + 0xa]
push edi
lea edi, [esi + 0x11]
mov dword [ebp - 0x72], edx
mov edx, dword [edi]
mov byte [ebp - 0x6c], cl
mov cx, word [edi + 8]
mov word [ebp - 0x6e], ax
mov eax, dword [edi + 4]
mov dword [ebp - 0x6b], edx
mov dl, byte [edi + 0xa]
mov word [ebp - 0x63], cx
mov word [ebp - 0x7c], 0x3ac1
mov byte [ebp - 0x7a], 2
mov dword [ebp - 0x67], eax
mov byte [ebp - 0x61], dl
xor ecx, ecx
mov al, byte [edi + ecx]
cmp al, 0x20
je 0x408449
cmp al, 0x22
je 0x408449
cmp al, 0x27
je 0x408449
inc ecx
cmp ecx, 0xb
jl 0x4083f2
mov eax, dword [0x4206c8]
mov dword [ebp - 0x40], eax
cmp eax, dword [0x4206cc]
je 0x408443
jmp 0x408423
mov eax, dword [ebp - 0x40]
push eax
push edi
call dword [sym.imp.MSVCR100.dll_strstr]
add esp, 8
test eax, eax
jne 0x408449
mov eax, dword [ebp - 0x40]
add eax, 0x20
mov dword [ebp - 0x40], eax
cmp eax, dword [0x4206cc]
jne 0x408420
mov byte [ebp - 0x60], 1
jmp 0x40844d
mov byte [ebp - 0x60], 0
mov al, byte [esi + 0x1c]
push 0x36
mov byte [ebp - 0x5e], al
or eax, 0xffffffff
lea edx, [ebp - 0x3b]
mov ecx, 1
push 0
push edx
mov byte [ebp - 0x5f], 0
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
mov dword [ebp - 0x49], eax
mov word [ebp - 0x44], cx
mov byte [ebp - 0x3c], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp byte [ebp - 0x60], 0
je 0x4085bf
push ebx
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x4eb8c0
call fcn.00412e90
add esp, 8
test al, al
je 0x4085bf
mov eax, dword [0x4eb8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4085bf
push 0xb
lea ecx, [ebp - 0x3c]
push ecx
push str.GameID1
call fcn.004131c0
push 0xb
lea edx, [ebp - 0x31]
push edx
push str.GameID2
call fcn.004131c0
push 0xb
lea eax, [ebp - 0x26]
push eax
push str.GameID3
call fcn.004131c0
push 0xb
lea ecx, [ebp - 0x1b]
push ecx
push str.GameID4
call fcn.004131c0
push 0xb
lea edx, [ebp - 0x10]
push edx
push str.GameID5
call fcn.004131c0
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]
lea edx, [ebp - 0x5f]
push edx
push 0x419366
lea eax, [ebp - 0x3c]
call fcn.00415430
add esp, 8
test al, al
jne 0x408550
mov byte [ebp - 0x60], 2
jmp 0x4085de
movzx eax, byte [esi + 0x1c]
push eax
push edi
push ebx
push str.EXEC_WZ_CreateCharacter__s__s__d
mov ecx, 0x4eb8c0
call fcn.00412e90
add esp, 0x10
test al, al
je 0x4085bf
mov ecx, dword [0x4eb8cc]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4085bf
push 0x4ec4ee
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov esi, 0x4eb8c0
mov byte [ebp - 0x60], al
call fcn.00413030
cmp byte [ebp - 0x60], 1
jne 0x4085de
movzx ecx, byte [ebp - 0x5f]
push ebx
inc ecx
push edi
push ecx
push str.UPDATE_AccountCharacter_SET_GameID_d_s_WHERE_Id_s
mov ecx, esi
call fcn.00412e90
add esp, 0x10
call fcn.00413030
jmp 0x4085de
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]
mov byte [ebp - 0x60], 0
mov edx, dword [ebp + 8]
movzx ebx, byte [ebp - 0x7b]
lea ecx, [ebp - 0x7c]
push ecx
push edx
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