Function at 0x405680
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48c
mov eax, dword [0x7cdffc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x470]
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
push 0x400
push 0
push eax
mov dword [ebp - 0x478], ecx
mov dword [ebp - 0x474], 0
call fcn.006e6ec0
add esp, 0xc
test edi, edi
je 0x405754
push ebx
lea eax, [ebp - 0x470]
push str.SELECT_Count_DISTINCT_TutorialType.id__FROM_TutorialType_INNER_JOIN_Tutorial_ON_Tutorial.type__TutorialType.id_WHERE_Tutorial.lang___d
push eax
call fcn.00407ae0
add esp, 0xc
lea eax, [ebp - 0x488]
push eax
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x480]
push eax
lea eax, [ebp - 0x47c]
push eax
lea eax, [ebp - 0x470]
push eax
push dword [ebp - 0x478]
call fcn.0050d4b0
mov esi, dword [ebp - 0x47c]
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x405738
mov ecx, dword [ebp - 0x480]
imul ecx, dword [ebp - 0x484]
push dword [esi + ecx*4]
call fcn.006edaa4
add esp, 4
mov dword [edi], eax
push esi
call fcn.0050d6b0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a7b19
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4058e7
push ebx
lea eax, [ebp - 0x470]
push str.SELECT_DISTINCT_TutorialType.id__TutorialType.cn__TutorialType.en_FROM_TutorialType_INNER_JOIN_Tutorial_ON_Tutorial.type__TutorialType.id_WHERE_Tutorial.lang___d_ORDER_BY_TutorialType.id_ASC
push eax
call fcn.00407ae0
mov ebx, dword [ebp - 0x478]
lea eax, [ebp - 0x474]
add esp, 0xc
lea edx, [ebp - 0x470]
mov ecx, ebx
push 0
push eax
push 0
push 1
push 0xffffffffffffffff
call fcn.005038c0
add esp, 0x14
mov edi, eax
push dword [ebp - 0x474]
test edi, edi
je 0x4057d8
call fcn.004d5f90
add esp, 4
push ebx
call fcn.005216a0
add esp, 4
push eax
lea eax, [ebp - 0x70]
push str.Select_error__s___n
push eax
call fcn.00407ae0
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a7b19
mov esp, ebp
pop ebp
ret
call fcn.004d6c20
mov edi, eax
add esp, 4
cmp edi, 0x64
jne 0x4058bf
add esi, 0x804
push 0
push dword [ebp - 0x474]
call fcn.004d7250
add esp, 8
test eax, eax
jle 0x40581b
push 0
push dword [ebp - 0x474]
call fcn.004d7470
add esp, 8
mov dword [esi - 0x804], eax
push 1
push dword [ebp - 0x474]
call fcn.004d7250
add esp, 8
test eax, eax
jle 0x405863
push 1
push dword [ebp - 0x474]
call fcn.004d7670
mov edx, esi
add esp, 8
sub edx, eax
nop dword [eax]
nop word [eax + eax]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 0x802], cx
test cx, cx
jne 0x405850
push 2
push dword [ebp - 0x474]
call fcn.004d7250
add esp, 8
test eax, eax
jle 0x4058a0
push 2
push dword [ebp - 0x474]
call fcn.004d7670
mov edx, esi
add esp, 8
sub edx, eax
nop dword [eax + eax]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x405890
push dword [ebp - 0x474]
add esi, 0x1004
call fcn.004d6c20
mov edi, eax
add esp, 4
cmp edi, 0x64
je 0x4057f1
push dword [ebp - 0x474]
cmp edi, 0x65
jne 0x4057a2
call fcn.004d5f90
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006a7b19
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006a7b19
mov esp, ebp
pop ebp
ret