Function at 0x40f440
Capabilities:
Reference sql statements

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42baa0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x500
mov eax, dword [0x439008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0x10]
push esi
mov dword [ebp - 0x504], eax
call fcn.0040f310
test eax, eax
je 0x40f4a1
mov al, 3
jmp 0x40f777
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f4a6
sub ecx, edx
xor eax, eax
test ecx, ecx
jle 0x40f4cc
mov dl, byte [eax + esi]
cmp dl, 0x20
je 0x40f50e
cmp dl, 0x22
je 0x40f50e
cmp dl, 0x27
je 0x40f50e
inc eax
cmp eax, ecx
jl 0x40f4b5
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x508], esp
push str._a_zA_Z0_9___
call fcn.00401f80
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
push esi
call fcn.00401f80
push 0
mov dword [ebp - 4], 0xffffffff
call fcn.00403f60
test al, al
jne 0x40f515
cmp dword [0x5cd674], 0
jne 0x40f515
mov al, 4
jmp 0x40f777
push edi
push esi
push str.WZ_GuildCreate__s__s
push 0x439d58
call fcn.004112b0
add esp, 0x10
test al, al
je 0x40f75b
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40f75b
push 0x43b53e
call fcn.0041a6da
add esp, 4
push dword [0x439d64]
test eax, eax
jne 0x40f743
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x5cb860
push 0
push dword [ebp - 0x504]
mov dword [0x5cb860], 0x20
push 0
push 0x20
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 1
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
movzx eax, byte [ebx + 0x18]
push esi
push eax
push str.UPDATE_Guild_SET_G_Mark__G_Type_d_WHERE_G_Name_s
push 0x439d58
call fcn.004112b0
add esp, 0x10
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push edi
push 0x80
push str.UPDATE_GuildMember_SET_G_Status_d_WHERE_Name_s
push 0x439d58
call fcn.004112b0
add esp, 0x10
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
lea ecx, [ebp - 0x500]
call fcn.0040ede0
push esi
push str.SELECT_Number_FROM_Guild_WHERE_G_Name_s
push 0x439d58
call fcn.004112b0
add esp, 0xc
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFetch]
push str.Number
call fcn.00411500
cmp eax, 0xffffffff
jne 0x40f646
or eax, eax
jmp 0x40f657
shl eax, 0xd
add eax, 0x43b53e
push eax
call fcn.0041a6da
add esp, 4
push dword [0x439d64]
mov dword [ebp - 0x500], eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov al, byte [esi + 8]
movq xmm0, qword [esi]
mov byte [ebp - 0x4e7], al
movzx eax, word [edi + 8]
mov word [ebp - 0x4de], ax
mov al, byte [edi + 0xa]
mov byte [ebp - 0x4dc], al
mov al, byte [ebx + 0x18]
mov byte [ebp - 0x4f0], al
mov eax, dword [ebp - 0x504]
movq qword [ebp - 0x4ef], xmm0
movq xmm0, qword [edi]
movq qword [ebp - 0x4e6], xmm0
movups xmm0, xmmword [eax]
mov byte [ebp - 0x473], 0x80
movups xmmword [ebp - 0x49f], xmm0
movups xmm0, xmmword [eax + 0x10]
movzx eax, word [edi + 8]
mov word [ebp - 0x476], ax
mov al, byte [edi + 0xa]
mov byte [ebp - 0x474], al
mov eax, 0xffff
movups xmmword [ebp - 0x48f], xmm0
mov word [ebp - 0x472], ax
movq xmm0, qword [edi]
mov eax, dword [0x439a98]
movq qword [ebp - 0x47e], xmm0
cmp eax, dword [0x439a9c]
je 0x40f72d
mov edi, eax
lea esi, [ebp - 0x500]
mov ecx, 0x139
mov al, 1
rep movsd dword es:[edi], dword [esi]
add dword [0x439a98], 0x4e4
jmp 0x40f777
lea ecx, [ebp - 0x500]
push ecx
push eax
mov ecx, 0x439a94
call fcn.0040ffa0
mov al, 1
jmp 0x40f777
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov al, 2
jmp 0x40f777
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00414177
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14