Function at 0x520c20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x742ee8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x844
push ebx
push esi
push edi
push 0x55d4
push str.cq_calendar
lea eax, [ebp - 0x450]
push str.SELECT__FROM__s_WHERE_id____u_ORDER_BY_id
mov ebx, ecx
push eax
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x10
lea eax, [ebp - 0x450]
mov edx, dword [ecx]
push 1
push eax
call dword [edx]
mov esi, eax
mov dword [ebp - 0x50], esi
xor edi, edi
cmp esi, edi
mov dword [ebp - 4], edi
jne 0x520cb3
push 0x1d
push 0x7af360
push str.pRes
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x60]
cmp edi, eax
jae 0x520d5e
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x44]
mov word [ebp - 0x20], ax
mov edx, dword [esi]
push 2
mov ecx, esi
call dword [edx + 0x44]
mov byte [ebp - 0x1e], al
mov eax, dword [esi]
push 3
mov ecx, esi
call dword [eax + 0x44]
mov byte [ebp - 0x1d], al
mov edx, dword [esi]
push 4
mov ecx, esi
call dword [edx + 0x44]
mov byte [ebp - 0x1c], al
mov eax, dword [esi]
push 5
mov ecx, esi
call dword [eax + 0x44]
mov word [ebp - 0x1a], ax
mov edx, dword [esi]
push 6
mov ecx, esi
call dword [edx + 0x44]
mov edx, dword [ebx + 0xc]
lea ecx, [ebx + 4]
mov word [ebp - 0x18], ax
mov eax, dword [ecx + 4]
cmp eax, edx
je 0x520d47
test eax, eax
je 0x520d31
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov edx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
mov dx, word [ebp - 0x18]
mov word [eax + 8], dx
mov eax, dword [ecx + 4]
add eax, 0xa
inc edi
mov dword [ecx + 4], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x64]
jmp 0x520cb3
lea edx, [ebp - 0x20]
push edx
push eax
call fcn.00521970
mov eax, dword [esi]
mov ecx, esi
inc edi
call dword [eax + 0x64]
jmp 0x520cb3
mov ecx, 9
xor eax, eax
lea edi, [ebp - 0x4c]
rep stosd dword es:[edi], eax
mov ecx, dword [0x7fd53c]
test ecx, ecx
jne 0x520d97
push 0x1a0
push 0x797a90
push str.g_pConfigSet
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
xor ecx, ecx
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0x408
push edx
call fcn.0047ae00
mov eax, dword [eax]
test eax, eax
je 0x520e0f
mov edx, dword [eax]
push 2
mov ecx, eax
call dword [edx + 8]
mov ecx, eax
mov eax, 0x431bde83
mul ecx
shr edx, 0x12
sub edx, 0x76c
mov eax, ecx
mov dword [ebp - 0x38], edx
xor edx, edx
mov edi, 0xf4240
div edi
mov eax, 0xd1b71759
mov edi, 0x2710
mul edx
shr edx, 0xd
dec edx
mov eax, ecx
mov dword [ebp - 0x3c], edx
xor edx, edx
div edi
mov eax, 0x51eb851f
mul edx
shr edx, 5
mov dword [ebp - 0x40], edx
mov eax, ecx
xor edx, edx
mov ecx, 0x64
div ecx
mov dword [ebp - 0x44], edx
jmp 0x520e97
lea edx, [ebp - 0x28]
push edx
call fcn.0070273d
lea eax, [ebp - 0x28]
push eax
call fcn.007025dd
mov ecx, dword [eax + 0x14]
mov edi, dword [eax + 0x10]
add esp, 8
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea edx, [edi + edx*4 + 0x2e631]
mov edi, dword [eax + 0xc]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
lea edx, [edi + edx*4]
mov edi, dword [eax + 8]
mov dword [ebp - 0x38], ecx
mov ecx, dword [eax + 0x10]
lea edx, [edx + edx*4]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [eax + 0xc]
lea edx, [edx + edx*4]
mov dword [ebp - 0x40], ecx
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x850]
lea edx, [edi + edx*4]
mov dword [ebp - 0x44], eax
push edx
push 0x408
push 0x7af354
push str.INSERT_INTO__s_VALUES_0___d___d__0__0__0__0__
push ecx
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x14
lea eax, [ebp - 0x850]
mov edx, dword [ecx]
push 0
push eax
call dword [edx + 8]
lea ecx, [ebp - 0x4c]
push ecx
call fcn.007034a9
add esp, 4
mov ecx, ebx
mov dword [ebx + 0x40], eax
call fcn.005212f0
xor edx, edx
mov edi, 0xe10
mov ecx, eax
div edi
push ecx
mov ecx, ebx
mov edi, edx
mov dword [ebp - 0x24], edi
call fcn.005210c0
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x520f0b
push 0x58
push 0x7af360
push str.pVTime
push str.CHECKF
push 0x793720
call fcn.00401080
mov edx, dword [esi]
add esp, 0x14
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call dword [edx + 4]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
and edi, 0xffff
mov eax, 0xe10
lea ecx, [ebx + 0x10]
sub eax, edi
mov dword [ecx + 4], eax
call fcn.006923c0
mov ecx, dword [ebp - 0x14]
mov ax, word [ecx + 6]
mov ecx, dword [ebp - 0x24]
cmp cx, ax
mov dword [ebp - 0x10], eax
jae 0x520f4d
and eax, 0xffff
lea ecx, [ebx + 0x1c]
sub eax, edi
mov dword [ecx + 4], eax
call fcn.006923c0
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov dx, word [edx + 8]
cmp cx, dx
mov dword [ebp - 0x14], edx
jae 0x520f78
and edx, 0xffff
lea ecx, [ebx + 0x28]
sub edx, edi
mov dword [ecx + 4], edx
call fcn.006923c0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
cmp cx, ax
mov byte [ebx + 0x3c], 1
jb 0x520f8a
cmp cx, dx
jae 0x520f8a
mov byte [ebx + 0x3c], 0
mov eax, dword [esi]
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret