Function at 0x4cbb40
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x4b4
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0x4b0], eax
mov ecx, dword [esp + 0x4c4]
mov edx, dword [esp + 0x4cc]
mov eax, dword [esp + 0x4c0]
push ebx
mov ebx, dword [esp + 0x4bc]
push ebp
xor ebp, ebp
cmp dword [esp + 0x4c4], 7
push esi
mov esi, dword [esp + 0x4d4]
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], ebp
je 0x4cbbb0
cmp eax, ebp
je 0x4cbbb0
push eax
lea eax, [esp + 0x2f8]
push eax
call fcn.004a7510
add esp, 8
mov ecx, dword [ebx + 0x6e4]
mov dword [esp + 0x34], ecx
cmp esi, ebp
je 0x4cbbeb
push ebp
push ebp
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x3c]
push eax
push fcn.00472210
push ebp
push esi
call fcn.0050dfb0
mov edi, eax
add esp, 0x1c
cmp edi, ebp
jne 0x4cbed7
mov esi, dword [esp + 0x24]
xor edi, edi
jmp 0x4cbc10
mov edi, dword [ebx + 0x17a93]
sub edi, 1
mov dword [esp + 0x28], edi
jns 0x4cbbfe
xor edi, edi
jmp 0x4cbc0a
lea edi, [edi + edi*2]
shl edi, 4
add edi, dword [ebx + 0x17a9b]
xor esi, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], edi
test edi, edi
jne 0x4cbc5a
test esi, esi
je 0x4cbff2
push 0x2a9
lea ecx, [esp + 0x4c]
push 0
push ecx
call sub.MSVCR90.dll_memset
mov eax, dword [esp + 0x50]
add esp, 0xc
test eax, eax
je 0x4cbc51
push eax
lea edx, [esp + 0x1f4]
push edx
call fcn.004a7510
mov esi, dword [esp + 0x2c]
add esp, 8
test edi, edi
je 0x4cbc72
mov ebp, dword [edi + 0x1e]
jmp 0x4cbc85
cmp dword [edi], 0x410
je 0x4cbc20
sub dword [esp + 0x28], 1
js 0x4cbc6e
sub edi, 0x30
jmp 0x4cbc10
xor edi, edi
jmp 0x4cbc10
movzx eax, word [esi + 2]
cmp ax, word [esi + 4]
jne 0x4cbc80
xor ebp, ebp
jmp 0x4cbc85
movsx ebp, ax
add ebp, esi
mov al, byte [ebp]
mov byte [esp + 0x3c], al
test al, al
je 0x4cbcad
mov eax, dword [esp + 0x3c]
push eax
call fcn.004a82e0
add esp, 4
test al, al
je 0x4cbcad
mov al, byte [ebp + 1]
inc ebp
mov byte [esp + 0x3c], al
test al, al
jne 0x4cbc90
mov ecx, dword [0x629cd8]
push ecx
push str.CHECK
push ebp
call dword [sym.imp.MSVCR90.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x4cc241
add ebp, dword [0x629cd8]
test edi, edi
je 0x4cbcde
mov edx, dword [edi + 0x12]
mov dword [esp + 0x2c], edx
jmp 0x4cbcfe
mov eax, dword [esp + 0x24]
movzx ecx, word [eax]
cmp cx, word [eax + 2]
jne 0x4cbcf5
mov dword [esp + 0x2c], 0
jmp 0x4cbcfe
movsx ecx, cx
add ecx, eax
mov dword [esp + 0x2c], ecx
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4cbd03
sub eax, edx
add eax, 0x234
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
je 0x4cc251
mov edi, dword [esp + 0x4cc]
lea ebx, [edi - 3]
mov esi, eax
mov byte [esi], 0
cmp ebx, 0x73
ja case.0x4cbd48.5
movzx eax, byte [ebx + 0x4cc318]
jmp dword [eax*4 + 0x4cc308]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x2f4]
push ecx
push str.FOR_TABLE__s
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
mov eax, dword [esp + 0x38]
push eax
mov edi, str.CONSTRAINT__s_CHECK
lea esi, [esp + 0x28]
call fcn.004c6cf0
add esp, 0x10
test eax, eax
jne 0x4cbefa
cmp dword [esp + 0x4cc], 3
jne 0x4cbdc6
mov eax, dword [esp + 0x10]
cmp byte [eax + 4], 0
je 0x4cbdc6
mov edx, dword [esp + 0x14]
mov byte [esp + 0x1ef], 1
mov ecx, dword [eax + 5]
imul ecx, ecx, 0x16c
mov eax, dword [ecx + edx + 0x6e8]
push eax
lea ecx, [esp + 0x1f4]
push ecx
call fcn.004a7510
add esp, 8
mov esi, dword [esp + 0x18]
mov dword [esp + 0x1c], 0
jmp case.0x4cbd48.5
push str.CHECK
push esi
call dword [sym.imp.MSVCR90.dll_sprintf]
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x17a88]
mov ax, word [eax + 0x17a8c]
add esp, 8
mov byte [esp + 0x1e8], 1
mov byte [esp + 0x4e], 1
mov dword [esp + 0x1e9], edx
mov word [esp + 0x1ed], ax
mov dword [esp + 0x1c], 0
jmp case.0x4cbd48.5
lea ecx, [esp + 0x2f4]
push ecx
push str.SELECT__FROM__s_WHERE_NOT
push esi
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x38]
mov dword [esp + 0x1c], edx
cmp edi, 0x76
jne case.0x4cbd48.5
mov byte [esp + 0x1ef], 1
mov eax, esi
lea edx, [eax + 1]
jmp 0x4cbe50
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4cbe50
sub eax, edx
push ebp
add eax, esi
push 0x5a85d0
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
mov eax, dword [esp + 0x28]
push 0
push 0
push eax
lea ecx, [esp + 0x38]
push ecx
push fcn.00472210
lea edx, [esp + 0x68]
push edx
push esi
call fcn.0050dfb0
mov edi, eax
add esp, 0x28
test edi, edi
jne 0x4cbed7
cmp ebx, 0x73
ja case.0x4cbe9f.2
movzx eax, byte [ebx + 0x4cc3a0]
jmp dword [eax*4 + 0x4cc38c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
push edx
call fcn.004c9790
mov edi, eax
add esp, 8
test edi, edi
je case.0x4cbe9f.2
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0050dec0
add esp, 4
push 0xbb9
push 0
call fcn.00406f10
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x4cbef8
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x4c0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00586584
add esp, 0x4b4
ret
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x24]
push ebx
call fcn.004c9790
mov edi, eax
add esp, 8
test edi, edi
je 0x4cbf3e
mov edx, dword [esp + 0x20]
push edx
jmp 0x4cbecf
mov ebx, dword [esp + 0x14]
cmp byte [ebx + 0x17fb1], 0
je case.0x4cbe9f.2
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
push ecx
push ebx
call fcn.004caa50
mov edi, eax
add esp, 8
test edi, edi
jne 0x4cbed7
jmp case.0x4cbe9f.2
cmp dword [esp + 0x38], 0
jne 0x4cc27e
mov edx, dword [esp + 0x20]
push edx
call fcn.0050dec0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4cbed7
test esi, esi
je 0x4cbf99
push esi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [esp + 0x18], edi
mov esi, dword [esp + 0x24]
test esi, esi
je 0x4cbfcc
mov ecx, dword [esp + 0x30]
push 0
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.00490540
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4cbed7
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
jmp 0x4cbc14
sub dword [esp + 0x28], 1
js 0x4cbfe1
sub dword [esp + 0x10], 0x30
mov edi, dword [esp + 0x10]
jmp 0x4cbc14
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x10]
jmp 0x4cbc14
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4cc00d
push eax
call fcn.0050dec0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4cbed7
cmp dword [esp + 0x4cc], 3
jne 0x4cc03e
mov edx, dword [esp + 0x14]
cmp byte [edx + 0x17fb1], 0
je 0x4cc03e
lea eax, [esp + 0x2f4]
push eax
call fcn.004cb0e0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4cbed7
mov ecx, dword [esp + 0x14]
cmp byte [ecx + 0x17fb1], 0
je 0x4cc22f
xor ebx, ebx
cmp dword [esp + 0x34], ebx
lea esi, [ecx + 0x6e8]
mov dword [esp + 0x1c], esi
jle 0x4cc1ab
add esi, 0x133
jmp 0x4cc070
cmp dword [esi - 0x11d], 0
je 0x4cc18e
cmp byte [esi - 0x118], 0
je 0x4cc093
cmp byte [esi - 0x98], 0
jne 0x4cc15c
movzx eax, word [esi - 0x12f]
cmp ax, 0xe
je 0x4cc12c
cmp ax, 0x1e
je 0x4cc0c0
cmp ax, 4
je 0x4cc0c0
cmp ax, 0x1d
je 0x4cc0c0
cmp ax, 0xc
jne 0x4cc1bf
cmp ax, 0xe
je 0x4cc12c
cmp ax, 0x1e
je 0x4cc12c
cmp ax, 0xc
jne 0x4cc0fe
xor eax, eax
mov dword [esi - 0x10], eax
mov dword [esi - 0xc], eax
mov dword [esi - 8], eax
mov dword [esi - 4], eax
or eax, 0xffffffff
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi], 5
mov dword [esi - 0x14], 5
jmp 0x4cc15c
cmp ax, 4
je 0x4cc10a
cmp ax, 0x1d
jne 0x4cc15c
mov eax, esi
mov ecx, 4
xor edx, edx
mov dword [eax - 0x14], edx
mov dword [eax], 0xffffffff
add eax, 4
sub ecx, 1
jne 0x4cc113
mov dword [esi - 4], edx
mov dword [esi + 0x10], edx
jmp 0x4cc15c
xor eax, eax
mov dword [esi - 0x14], eax
mov dword [esi - 0x10], eax
mov dword [esi - 0xc], eax
mov dword [esi - 8], eax
mov dword [esi - 4], eax
or eax, 0xffffffff
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
movzx eax, word [esi - 0x12d]
mov word [esi], ax
mov word [esi - 0x14], ax
movzx edx, byte [esi - 0x12b]
push esi
lea ecx, [esi - 0x14]
push ecx
push edx
lea eax, [esi - 0x12f]
push eax
lea ebp, [esi - 0x18]
push ebp
call fcn.0050d7c0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4cbed7
mov cl, byte [esi - 0x17]
cmp cl, byte [ebp]
ja 0x4cc1e9
add dword [esp + 0x1c], 0x16c
mov ecx, dword [esp + 0x14]
inc ebx
add esi, 0x16c
cmp ebx, dword [esp + 0x34]
jl 0x4cc070
cmp byte [ecx + 0x178f2], 0
jne 0x4cc21c
push ecx
call fcn.004c9600
add esp, 4
jmp 0x4cc21e
imul ebx, ebx, 0x16c
mov edx, dword [ebx + ecx + 0x6e8]
push edx
push 0x7dd
push 0x1f59
call fcn.00406f10
add esp, 0xc
mov eax, 0x1f59
jmp 0x4cbefa
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
movzx edx, byte [eax + 0x11b]
movzx eax, byte [eax + 0x11c]
push ecx
push edx
push eax
push 0x7dd
push 0x1fac
call fcn.00406f10
add esp, 0x14
mov eax, 0x1fac
jmp 0x4cbefa
xor al, al
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x4cc23a
mov byte [ecx], al
xor eax, eax
jmp 0x4cbefa
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4cc23a
mov byte [eax], 0
xor eax, eax
jmp 0x4cbefa
mov edi, dword [esp + 0x18]
mov esi, 0x1b
mov eax, str.c_c_c
jmp 0x4cc25a
mov eax, dword [esp + 0x38]
mov esi, 6
push eax
push 0xbb9
push esi
call fcn.00406f10
add esp, 0xc
test edi, edi
je 0x4cc277
push edi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, esi
jmp 0x4cbefa
mov eax, dword [esp + 0x20]
push eax
call fcn.0050dec0
mov eax, dword [esp + 0x34]
add esp, 4
test eax, eax
je 0x4cc29c
push eax
call fcn.0050dec0
add esp, 4
cmp dword [esp + 0x4cc], 0x76
jne 0x4cc2cd
lea ecx, [esp + 0x1f0]
push ecx
lea edx, [esp + 0x3fc]
push str.replace_VALUE_by_fieldname___s__n
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x3f8]
jmp 0x4cc2d2
mov eax, 0x5a8a1a
push eax
push esi
lea eax, [esp + 0x2fc]
push eax
push 0xbb9
push 0x2386
call fcn.00406f10
add esp, 0x14
test esi, esi
je 0x4cc2fc
push esi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, 0x2386
jmp 0x4cbefa