Function at 0x409810
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x421018]
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 0x4098c9
cmp al, 0x22
je 0x4098c9
cmp al, 0x27
je 0x4098c9
inc ecx
cmp ecx, 0xb
jl 0x409872
mov eax, dword [0x4226c8]
mov dword [ebp - 0x40], eax
cmp eax, dword [0x4226cc]
je 0x4098c3
jmp 0x4098a3
mov eax, dword [ebp - 0x40]
push eax
push edi
call dword [sym.imp.MSVCR100.dll_strstr]
add esp, 8
test eax, eax
jne 0x4098c9
mov eax, dword [ebp - 0x40]
add eax, 0x20
mov dword [ebp - 0x40], eax
cmp eax, dword [0x4226cc]
jne 0x4098a0
mov byte [ebp - 0x60], 1
jmp 0x4098cd
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 0x409a3f
push ebx
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x4ed8c0
call fcn.00414e40
add esp, 8
test al, al
je 0x409a3f
mov eax, dword [0x4ed8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x409a3f
push 0xb
lea ecx, [ebp - 0x3c]
push ecx
push str.GameID1
call fcn.00415170
push 0xb
lea edx, [ebp - 0x31]
push edx
push str.GameID2
call fcn.00415170
push 0xb
lea eax, [ebp - 0x26]
push eax
push str.GameID3
call fcn.00415170
push 0xb
lea ecx, [ebp - 0x1b]
push ecx
push str.GameID4
call fcn.00415170
push 0xb
lea edx, [ebp - 0x10]
push edx
push str.GameID5
call fcn.00415170
mov eax, dword [0x4ed8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x4ed8cc]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
lea edx, [ebp - 0x5f]
push edx
push 0x41b8a6
lea eax, [ebp - 0x3c]
call fcn.004175a0
add esp, 8
test al, al
jne 0x4099d0
mov byte [ebp - 0x60], 2
jmp 0x409a5e
movzx eax, byte [esi + 0x1c]
push eax
push edi
push ebx
push str.EXEC_WZ_CreateCharacter__s__s__d
mov ecx, 0x4ed8c0
call fcn.00414e40
add esp, 0x10
test al, al
je 0x409a3f
mov ecx, dword [0x4ed8cc]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x409a3f
push 0x4ee4ee
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov esi, 0x4ed8c0
mov byte [ebp - 0x60], al
call fcn.00414fe0
cmp byte [ebp - 0x60], 1
jne 0x409a5e
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.00414e40
add esp, 0x10
call fcn.00414fe0
jmp 0x409a5e
mov edx, dword [0x4ed8cc]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x4ed8cc]
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.00416c00
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417d4a
mov esp, ebp
pop ebp
ret