Function at 0x40d3c0
Capabilities:
Reference sql statements

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40d8c9
sub esp, 0x4c
mov eax, dword [esp + 0x54]
test eax, eax
je 0x40d8b0
movzx ecx, byte [eax + 4]
test cl, 4
jne 0x40d89a
mov ecx, dword [esp + 0x50]
mov ebx, dword [ecx + 0x20]
mov ebx, dword [ebx + 0x10]
mov dword [esp + 0x38], ebx
mov edx, dword [ebx]
mov ebp, dword [eax + 8]
mov esi, dword [esp + 0x58]
mov dword [esp], esi
mov dword [esp + 4], ebp
mov ebp, dword [edx]
call ebp
mov eax, dword [esp + 8]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x54]
movzx ebx, byte [ecx + 4]
xor ebx, 4
mov byte [ecx + 4], bl
mov ebx, dword [ecx + 0xc]
test ebx, ebx
je 0x40d836
mov ebx, dword [esp + 0x50]
jmp 0x40d513
inc esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x34], edi
mov esi, dword [esp + 0x18]
mov edi, ebp
mov ebp, dword [esp + 0x48]
mov esi, dword [esp + 0x14]
cmp esi, 8
jae 0x40d7d7
mov dword [esp + 0x2c], edi
test byte [ebp], al
movzx edi, byte [ebp + esi]
add ebp, esi
xchg edi, ebx
cmp al, bl
xchg edi, ebx
je 0x40d71e
xchg edi, eax
cmp al, 1
xchg edi, eax
ja 0x40d487
test ecx, ecx
je 0x40d6e6
mov ebp, dword [esp + 0x2c]
xchg edi, eax
test al, al
xchg edi, eax
je 0x40d497
mov edi, dword [esp + 0x34]
jmp 0x40d43e
mov esi, dword [esp + 0x34]
mov dword [esp + 0x34], esi
mov dword [esp + 0x44], ebp
mov dword [esp + 0x30], ecx
mov edi, dword [edx + 0x10]
test edi, edi
jne 0x40d55e
mov edi, dword [edx]
inc edi
movzx eax, byte [edx + 5]
cmp edi, 8
jle 0x40d6dd
mov ecx, eax
mov ebp, 1
shl ebp, cl
shr ebp, 1
lea esi, [ebp + ebp*2]
lea ebp, [ebp + esi*4]
cmp edi, ebp
xchg ebp, ebx
seta bl
xchg ebp, ebx
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x40d6b8
mov eax, 1
test al, al
je 0x40d55e
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0040e520
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x18]
mov eax, edx
mov ecx, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
movzx ebp, byte [ecx + 5]
mov edx, ecx
mov ecx, ebp
mov esi, 1
shl esi, cl
lea ebp, [esi - 1]
and ebp, eax
mov esi, dword [edx + 0x10]
test esi, esi
jne 0x40d80d
movzx esi, word [ebx + 0x2e]
imul ebp, esi
add ebp, dword [edx + 0xc]
mov esi, eax
shr eax, 0x18
cmp al, 5
jae 0x40d549
add eax, 5
mov byte [esp + 0x13], al
xor ecx, ecx
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x34], ecx
xor ecx, ecx
jmp 0x40d7ea
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40d683
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], eax
mov esi, dword [ebx + 0x30]
test esi, 1
jne 0x40d635
mov esi, dword [ebx + 0x30]
test esi, 2
jne 0x40d5ef
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
call fcn.004121b0
movzx eax, byte [esp + 0x13]
mov ecx, dword [esp + 0x30]
mov byte [ecx], al
mov eax, dword [esp + 0x54]
inc dword [eax]
mov ecx, dword [esp + 0x34]
movzx edx, byte [eax + 4]
test dl, 4
je 0x40d884
and edx, 0xfffffffb
mov byte [eax + 4], dl
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 0x30]
test eax, 2
je 0x40d5eb
mov eax, dword [ecx]
mov dword [esp + 0x5c], eax
add esp, 0x4c
ret
mov eax, ecx
jmp 0x40d5e3
mov dword [esp + 0x2c], ecx
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov byte [esp + 8], 1
call fcn.0040b5a0
mov edi, dword [esp + 0x34]
test byte [edi], al
mov eax, dword [0x144ddb0]
mov ecx, dword [esp + 0xc]
test eax, eax
jne 0x40d62c
mov dword [edi], ecx
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x50]
jmp 0x40d594
mov eax, ecx
call fcn.00458080
jmp 0x40d61f
mov dword [esp + 0x40], ecx
mov eax, dword [ebx + 0x20]
mov ecx, dword [eax]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov byte [esp + 8], 1
call fcn.0040b5a0
mov edi, dword [esp + 0x40]
test byte [edi], al
mov eax, dword [0x144ddb0]
mov ecx, dword [esp + 0xc]
test eax, eax
jne 0x40d67a
mov dword [edi], ecx
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
mov ebp, dword [esp + 0x34]
jmp 0x40d589
mov eax, ecx
call fcn.00458080
jmp 0x40d665
mov dword [esp], edx
mov dword [esp + 4], ebx
mov eax, dword [esp + 0x48]
mov dword [esp + 8], eax
call fcn.0040c710
mov eax, dword [esp + 0xc]
test byte [eax], al
nop
mov ebx, dword [esp + 0x50]
movzx ecx, byte [ebx + 0x2c]
lea edx, [eax + 8]
lea ebp, [eax + ecx*8 + 8]
mov ecx, edx
mov edx, dword [esp + 0x54]
jmp 0x40d572
movzx ebp, word [edx + 6]
cmp al, 0xf
jbe 0x40d6c6
mov eax, 0xf
and eax, 0xf
mov ecx, eax
mov esi, 1
shl esi, cl
cmp bp, si
setae al
jmp 0x40d4ed
mov ecx, eax
xor ebp, ebp
jmp 0x40d4de
movzx ecx, byte [ebx + 0x2c]
imul esi, ecx
movzx edx, byte [ebx + 0x2d]
mov ebx, dword [esp + 0x14]
imul edx, ebx
lea ecx, [edx + ecx*8]
mov edx, dword [esp + 0x48]
lea esi, [esi + edx + 8]
lea ecx, [ecx + edx + 8]
mov edx, dword [esp + 0x54]
mov dword [esp + 0x34], ecx
mov ecx, ebp
mov ebp, esi
mov esi, ebx
mov ebx, dword [esp + 0x50]
jmp 0x40d48b
mov dword [esp + 0x3c], ecx
movzx ebp, byte [ebx + 0x2c]
imul ebp, esi
mov edi, dword [esp + 0x48]
lea ebp, [ebp + edi + 8]
mov edi, dword [ebx + 0x30]
test edi, 1
je 0x40d73f
mov ebp, dword [ebp]
mov dword [esp + 0x28], ebp
mov eax, dword [esp + 0x38]
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x58]
mov dword [esp], ecx
mov dword [esp + 4], ebp
mov ebx, dword [edx]
call ebx
movzx eax, byte [esp + 8]
test al, al
jne 0x40d784
movzx eax, byte [esp + 0x13]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
jmp 0x40d43e
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + 0x30]
test ecx, 8
jne 0x40d7b6
movzx edx, byte [eax + 0x2c]
movzx ebx, byte [eax + 0x2d]
mov ebp, dword [esp + 0x14]
imul ebx, ebp
lea edx, [ebx + edx*8]
mov ebx, dword [esp + 0x48]
lea ecx, [ebx + edx + 8]
mov eax, dword [esp + 0x54]
jmp 0x40d5c0
mov ecx, dword [eax + 0x20]
mov dword [esp], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 8], ecx
call fcn.004121b0
mov eax, dword [esp + 0x50]
jmp 0x40d793
movzx esi, word [ebx + 0x2e]
lea ebp, [ebp + esi - 4]
mov ebp, dword [ebp]
test ebp, ebp
je 0x40d802
mov esi, dword [esp + 0x18]
mov dword [esp + 0x48], ebp
mov byte [esp + 0x20], al
xor eax, eax
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x20]
jmp 0x40d451
mov ebp, edi
mov esi, dword [esp + 0x34]
jmp 0x40d49b
mov dword [esp + 0x1c], ebp
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
call fcn.0040e700
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
mov ebp, dword [esp + 0x1c]
jmp 0x40d532
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + 0x28]
mov edx, dword [ecx]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov byte [esp + 8], 1
call fcn.0040b5a0
mov eax, dword [0x144ddb0]
mov ecx, dword [esp + 0xc]
test eax, eax
jne 0x40d872
mov eax, dword [esp + 0x54]
mov dword [eax + 0xc], ecx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x54]
jmp 0x40d435
mov ebx, dword [esp + 0x54]
lea edi, [ebx + 0xc]
mov eax, ecx
call fcn.00458080
mov eax, ebx
jmp 0x40d865
lea eax, [0xd5203b]
mov dword [esp], eax
mov dword [esp + 4], 0x15
call fcn.0042e730
lea eax, [0xd5203b]
mov dword [esp], eax
mov dword [esp + 4], 0x15
call fcn.0042e730
lea eax, [0xc8cee0]
mov dword [esp], eax
lea eax, [0xe6b888]
mov dword [esp + 4], eax
call fcn.0042e200
nop
call fcn.004567f0
jmp fcn.0040d3c0