Function at 0x409bb0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2f4
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x13
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esi + 0xc]
push eax
call fcn.00439e40
add esp, 4
cmp eax, 3
jne 0x409e41
lea ebx, [esi + 0x10]
push ebx
call fcn.00439e40
add ebx, 4
push ebx
mov edi, eax
call fcn.00439e40
add esp, 8
add ebx, 4
cmp edi, 0x28
jl 0x409eba
mov edx, dword [ebp + 0x14]
lea ecx, [eax + edi]
cmp ecx, edx
jg 0x409eba
cmp eax, 4
jne 0x409eba
add edi, esi
push edi
call fcn.00439e40
add esp, 4
test eax, eax
mov dword [esp + 0xc], eax
jne 0x409c49
mov ecx, 0x14
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
jmp 0x409d9a
cmp eax, 1
jne 0x409c65
mov ecx, 7
mov esi, str.KaseyaFirewallLogByPeriodSema
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x409d9a
cmp eax, 2
jne 0x409c82
mov ecx, 7
mov esi, str.KaseyaStatisticLogByPeriodSema
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x409d9a
cmp eax, 3
jne 0x409cbc
mov edx, dword [str.KaseyaConfigLogSema]
mov eax, dword [0x46bbe8]
mov ecx, dword [0x46bbec]
mov dword [esp + 0x10], edx
mov edx, dword [0x46bbf0]
mov dword [esp + 0x14], eax
mov eax, dword [0x46bbf4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
jmp 0x409d9a
cmp eax, 4
jne 0x409d02
mov ecx, dword [str.KaseyaErrorLogSema]
mov edx, dword [0x46bbd4]
mov eax, dword [0x46bbd8]
mov dword [esp + 0x10], ecx
mov ecx, dword [0x46bbdc]
mov dword [esp + 0x14], edx
mov dx, word [0x46bbe0]
mov dword [esp + 0x18], eax
mov al, byte [0x46bbe2]
mov dword [esp + 0x1c], ecx
mov word [esp + 0x20], dx
mov byte [esp + 0x22], al
jmp 0x409d9a
cmp eax, 5
jne 0x409e93
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 0x268]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x268]
push ecx
mov byte [esp + 0x14], 0
mov dword [esp + 0x26c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x409d64
cmp dword [esp + 0x278], 2
jne 0x409d64
cmp dword [esp + 0x26c], 5
jb 0x409d64
mov edx, dword [str.Global_]
mov eax, dword [0x46bbcc]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
lea edi, [esp + 0x10]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409d70
mov ecx, dword [str.KaseyaAvLogSema]
mov edx, dword [0x46bbbc]
mov eax, dword [0x46bbc0]
mov dword [edi], ecx
mov ecx, dword [0x46bbc4]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
push ebx
call fcn.00439e40
add ebx, 4
push ebx
mov edi, eax
call fcn.00439e40
add esp, 8
add ebx, 4
cmp edi, 0x28
jl 0x409e7b
mov ecx, dword [ebp + 0x14]
lea edx, [eax + edi]
cmp edx, ecx
jg 0x409e7b
cmp eax, 1
jl 0x409e7b
mov eax, dword [ebp + 0x10]
add edi, eax
push edi
call fcn.00439e40
push ebx
mov esi, eax
call fcn.00439e40
add ebx, 4
push ebx
mov edi, eax
call fcn.00439e40
add esp, 0xc
cmp edi, 0x28
jl 0x409e72
mov edx, dword [ebp + 0x14]
lea ecx, [eax + edi]
cmp ecx, edx
jg 0x409e72
cmp eax, 1
jl 0x409e72
mov edx, dword [ebp + 0x10]
add edi, edx
mov ecx, edi
lea ebx, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x409e10
sub ecx, ebx
lea edx, [eax - 1]
cmp ecx, edx
jne 0x409e5a
mov eax, dword [esp + 0xc]
push esi
push eax
lea ecx, [esp + 0x18]
push ecx
push edi
call fcn.004025e0
add esp, 0x10
test eax, eax
jne 0x409ee3
jmp 0x409ee3
push 3
push eax
lea edx, [esp + 0x6c]
push str.ERROR:_clearFile___received_command_task_with__d_parameters_when__d_paramaters_were_expected._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x70]
push eax
jmp 0x409ed0
push edi
push eax
lea ecx, [esp + 0x6c]
push str.ERROR:_clearFile___received_command_task_with_invalid_3rd_parameter_data__len___d__string___s_._n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x70]
push edx
jmp 0x409ed0
push eax
push edi
push str.ERROR:_clearFile___received_command_task_with_invalid_3rd_parameter_data__offset__0x_08x_and_len__0x_08x_._n
jmp 0x409ec1
push eax
push edi
lea edx, [esp + 0x6c]
push str.ERROR:_clearFile___received_command_task_with_invalid_2nd_parameter_data__offset__0x_08x_and_len__0x_08x_._n
push edx
call fcn.00458ee7
lea eax, [esp + 0x70]
push eax
jmp 0x409ed0
push eax
lea ecx, [esp + 0x68]
push str.ERROR:_clearFile___received_command_task_with_invalid_1st_parameter_data__value___d_._n
push ecx
call fcn.00458ee7
lea edx, [esp + 0x6c]
push edx
mov dword [esp + 0x70], 1
call fcn.0043e010
add esp, 0x10
jmp 0x409ee0
push eax
push edi
push str.ERROR:_clearFile___received_command_task_with_invalid_1st_parameter_data__offset__0x_08x_and_len__0x_08x_._n
lea eax, [esp + 0x70]
push eax
call fcn.00458ee7
lea ecx, [esp + 0x70]
push ecx
mov dword [esp + 0x74], 1
call fcn.0043e010
add esp, 0x14
or eax, 0xffffffff
mov edx, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push edx
mov edx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push edx
push eax
push ecx
call fcn.004098a0
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret