Function at 0x4086f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x41d018]
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 0x408760
mov al, byte [esi + ecx]
cmp al, 0x20
je 0x4087b6
cmp al, 0x22
je 0x4087b6
cmp al, 0x27
je 0x4087b6
inc ecx
cmp ecx, 0xb
jl 0x408760
mov edi, dword [0x41d4c8]
cmp edi, dword [0x41d4cc]
je 0x4087a6
mov ebx, dword [sym.imp.MSVCR100.dll_strstr]
lea esp, [esp]
push edi
push esi
call ebx
add esp, 8
test eax, eax
jne 0x4087b0
add edi, 0x20
cmp edi, dword [0x41d4cc]
jne 0x408790
mov edx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
mov bl, 1
jmp 0x4087b8
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 0x4089f7
push edi
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
mov ecx, 0x41ee38
call fcn.00412310
add esp, 8
test al, al
je 0x4089f7
mov ecx, dword [0x41ee44]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFetch]
push ecx
call ebx
cmp ax, 0x64
je 0x4089f7
push str.GameID1
call fcn.004124d0
mov edi, dword [sym.imp.MSVCR100.dll_strncpy_s]
cmp eax, 0xffffffff
jne 0x408856
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov word [ebp - 0x34], ax
mov byte [ebp - 0x32], al
jmp 0x40886c
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea edx, [ebp - 0x3c]
push 0xb
push edx
call edi
add esp, 0x10
push str.GameID2
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40888c
xor eax, eax
mov dword [ebp - 0x31], eax
mov dword [ebp - 0x2d], eax
mov word [ebp - 0x29], ax
mov byte [ebp - 0x27], al
jmp 0x4088a2
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea eax, [ebp - 0x31]
push 0xb
push eax
call edi
add esp, 0x10
push str.GameID3
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x4088c2
xor eax, eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov word [ebp - 0x1e], ax
mov byte [ebp - 0x1c], al
jmp 0x4088d8
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea ecx, [ebp - 0x26]
push 0xb
push ecx
call edi
add esp, 0x10
push str.GameID4
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x4088f8
xor eax, eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
jmp 0x40890e
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea edx, [ebp - 0x1b]
push 0xb
push edx
call edi
add esp, 0x10
push str.GameID5
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40892e
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov word [ebp - 8], ax
mov byte [ebp - 6], al
jmp 0x408944
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea eax, [ebp - 0x10]
push 0xb
push eax
call edi
add esp, 0x10
mov ecx, dword [0x41ee44]
push ecx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x41ee44]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
lea eax, [ebp - 0x63]
push eax
push 0x418206
lea eax, [ebp - 0x3c]
call fcn.00414840
add esp, 8
test al, al
jne 0x408981
mov byte [ebp - 0x64], 2
jmp 0x408a16
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, 0x41ee38
call fcn.00412310
add esp, 0x10
test al, al
je 0x4089f0
mov eax, dword [0x41ee44]
push eax
call ebx
cmp ax, 0x64
je 0x4089f0
push 0x41fa66
call dword [sym.imp.MSVCR100.dll_atoi]
mov bl, al
add esp, 4
mov byte [ebp - 0x64], bl
call fcn.004124b0
cmp bl, 1
jne 0x408a16
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, 0x41ee38
call fcn.00412310
add esp, 0x10
call fcn.004124b0
jmp 0x408a16
call fcn.004124b0
jmp 0x408a12
mov edx, dword [0x41ee44]
push edx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov eax, dword [0x41ee44]
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.00413de0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415636
mov esp, ebp
pop ebp
ret