Function at 0x413ba0
Capabilities:
Reference sql statements

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x413e14
sub esp, 0x28
mov edx, dword [esp + 0x2c]
test byte [edx], al
movzx ebx, byte [esp + 0x30]
movzx eax, bl
cmp eax, 0x88
jae 0x413e09
mov ecx, dword [edx + eax*4 + 0x14]
movzx ebp, word [ecx + 0x38]
cmp dword [ecx + 0x1c], ebp
jne 0x413df3
mov dword [esp + 0x20], eax
lea ebp, [0x7f9000]
cmp ecx, ebp
je 0x413d09
mov ebp, dword [0x7d8b98]
add ebp, 3
cmp dword [ecx + 0x30], ebp
jne 0x413ddd
mov dword [esp + 0x1c], ecx
shl eax, 7
lea ebx, [0x7d8c30]
add eax, ebx
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00414720
lea eax, [0x7fa680]
mov dword [esp], eax
call fcn.004305f0
mov eax, dword [esp + 4]
test byte [eax], al
mov ecx, dword [esp + 0x1c]
movzx edx, word [ecx + 0x38]
movzx ebx, word [ecx + 0x3e]
mov ebp, edx
sub edx, ebx
movzx esi, byte [esp + 0x30]
xchg esi, eax
shr al, 1
xchg esi, eax
xchg esi, eax
movsx eax, al
xchg esi, eax
cmp esi, 0x44
jae 0x413dd1
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], eax
sub ebp, ebx
mov ecx, 0
sbb ecx, 0
mov dword [esp + 0x18], ecx
lea ebx, [eax + esi*8 + 0x48]
mov dword [esp], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call fcn.00402500
movzx eax, byte [esp + 0x30]
cmp al, 5
jne 0x413cbe
mov eax, dword [esp + 0x24]
add eax, 0x30
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x10]
mov dword [esp], eax
mov dword [esp + 8], 0
mov dword [esp + 4], edx
call fcn.00402500
mov eax, dword [esp + 0x2c]
mov dword [eax + 0x10], 0
lea eax, [0x7fa680]
mov dword [esp], eax
call fcn.004306f0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x40]
mov eax, dword [esp + 0x14]
mul ecx
nop
lea ebp, [0x7f9610]
mov dword [esp], ebp
mov ebp, dword [esp + 0x18]
imul ebp, ecx
lea ecx, [ebp + edx]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.00402500
mov eax, dword [esp + 0x1c]
mov word [eax + 0x3e], 0
mov eax, dword [esp + 0x20]
shl eax, 7
lea edx, [0x7d8c30]
add eax, edx
mov dword [esp], eax
call fcn.00414370
mov eax, dword [esp + 4]
test eax, eax
je 0x413dbb
movzx ecx, word [eax + 0x38]
cmp dword [eax + 0x1c], ecx
je 0x413da5
mov dword [esp + 0x1c], eax
mov ecx, dword [0x7d8b98]
add ecx, 3
mov dword [eax + 0x30], ecx
movzx ecx, word [eax + 0x38]
mov word [eax + 0x3e], cx
movzx ecx, word [eax + 0x38]
imul ecx, dword [eax + 0x40]
mov edx, dword [eax + 0x10]
shl edx, 0xd
sub edx, ecx
mov ecx, 0
sbb ecx, 0
mov ebx, dword [esp + 0x2c]
mov ebp, dword [ebx + 4]
lea esi, [0x7f9500]
mov dword [esp], esi
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebp
call fcn.004204d0
mov eax, dword [esp + 0x2c]
mov dword [eax + 4], 0
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4 + 0x14], edx
add esp, 0x28
ret
lea eax, [0x6215fe]
mov dword [esp], eax
mov dword [esp + 4], 0x16
call fcn.00436e90
lea eax, [0x61d59e]
mov dword [esp], eax
mov dword [esp + 4], 0xd
call fcn.00436e90
mov eax, esi
mov ecx, 0x44
call fcn.00464400
lea eax, [0x621278]
mov dword [esp], eax
mov dword [esp + 4], 0x16
call fcn.00436e90
lea eax, [0x627e52]
mov dword [esp], eax
mov dword [esp + 4], 0x28
call fcn.00436e90
mov ecx, 0x88
call fcn.00464400
nop
call fcn.00462f70
jmp fcn.00413ba0