Function at 0x4131d0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4ec
mov eax, dword [0x424018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov ebx, edx
mov dword [ebp - 0x4ec], esi
call fcn.00413010
test eax, eax
je 0x413211
pop edi
pop esi
mov al, 3
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret 8
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413216
sub eax, edx
xor edx, edx
test eax, eax
jle 0x413253
jmp 0x413230
mov cl, byte [edx + edi]
cmp cl, 0x20
je 0x4133e2
cmp cl, 0x22
je 0x4133e2
cmp cl, 0x27
je 0x4133e2
inc edx
cmp edx, eax
jl 0x413230
push ebx
push edi
push str.WZ_GuildCreate__s__s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0xc
test al, al
je 0x413411
mov eax, dword [0x424eec]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x413411
push 0x425b0e
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
test eax, eax
jne 0x4133f7
call fcn.00417930
mov ecx, 0x20
push esi
lea edx, [ecx - 0x1f]
call fcn.00417a80
movzx ecx, byte [ebp + 0xc]
push edi
push ecx
push str.UPDATE_Guild_SET_G_Mark__G_Type_d_WHERE_G_Name_s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0xc
call fcn.00417930
push ebx
push 0x80
push str.UPDATE_GuildMember_SET_G_Status_d_WHERE_Name_s
mov ecx, 0x424ee0
call fcn.00417790
add esp, 0xc
call fcn.00417930
lea esi, [ebp - 0x4e8]
call fcn.00412660
push edi
push str.SELECT_Number_FROM_Guild_WHERE_G_Name_s
mov ecx, 0x424ee0
call fcn.00417790
mov edx, dword [0x424eec]
add esp, 8
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
mov eax, str.Number
call fcn.004179a0
mov dword [ebp - 0x4e8], eax
call fcn.00417930
mov ecx, dword [edi + 4]
mov eax, dword [edi]
movzx edx, byte [edi + 8]
mov esi, dword [ebp - 0x4ec]
mov dword [ebp - 0x4d7], eax
mov eax, dword [ebx]
mov dword [ebp - 0x4d3], ecx
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x4ce], eax
mov al, byte [ebx + 0xa]
mov dword [ebp - 0x4ca], ecx
mov cl, byte [ebp + 0xc]
mov byte [ebp - 0x4cf], dl
mov dx, word [ebx + 8]
mov byte [ebp - 0x4c4], al
mov eax, dword [ebx + 4]
mov byte [ebp - 0x4d8], cl
mov word [ebp - 0x4c6], dx
mov edx, dword [ebx]
mov ecx, 8
lea edi, [ebp - 0x487]
rep movsd dword es:[edi], dword [esi]
mov cx, word [ebx + 8]
mov dword [ebp - 0x462], eax
mov dword [ebp - 0x466], edx
movzx edx, byte [ebx + 0xa]
mov eax, 0xffff
mov word [ebp - 0x45a], ax
lea eax, [ebp - 0x4e8]
mov ebx, 0x424394
mov word [ebp - 0x45e], cx
mov byte [ebp - 0x45c], dl
mov byte [ebp - 0x45b], 0x80
call fcn.00413e80
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
mov al, 4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret 8
call fcn.00417930
pop edi
pop esi
mov al, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret 8
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]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret 8