Function at 0x4337b5
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
sub esp, 0xa80
lea edx, [ebp - 0xa58]
mov eax, 0
mov ecx, 9
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
je 0x433807
mov dword [esp + 0xc], str.Running_daily_rotation_of_log_files.
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x36
mov dword [esp], str.monitord_rotate_log.c
call dbg._minfo
jmp 0x433867
cmp dword [ebp + 0x14], 0
je 0x43383b
mov dword [esp + 0x10], 0x4f3167
mov dword [esp + 0xc], str.Rotating__s_file:_Maximum_size_reached.
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x39
mov dword [esp], str.monitord_rotate_log.c
call dbg._minfo
jmp 0x433867
mov dword [esp + 0x10], 0x4f319e
mov dword [esp + 0xc], str.Rotating__s_file:_Maximum_size_reached.
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x3b
mov dword [esp], str.monitord_rotate_log.c
call dbg._minfo
cmp dword [ebp + 0x10], 0
je 0x433886
mov dword [esp], 0
call sym._time_14
sub eax, 0x15180
mov dword [ebp - 0xa5c], eax
jmp 0x433898
mov dword [esp], 0
call sym._time_14
mov dword [ebp - 0xa5c], eax
lea eax, [ebp - 0xa5c]
mov dword [esp + 4], eax
lea eax, [ebp - 0xa58]
mov dword [esp], eax
call sym._localtime_s_6
mov dword [esp + 0xc], 0x4f319e
mov dword [esp + 8], 0x4f31a8
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x110]
mov dword [esp], eax
call sym._snprintf_34
mov dword [esp + 0xc], 0x4f3167
mov dword [esp + 8], 0x4f31a8
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x214]
mov dword [esp], eax
call sym._snprintf_34
lea eax, [ebp - 0x318]
mov dword [eax], 0x73676f6c
mov byte [eax + 4], 0
mov eax, dword [tm.tm_mday]
add eax, 0x76c
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x318]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s__d
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x41c]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [tm.tm_hour]
mov eax, dword [eax*4 + 0x4e9120]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x41c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31b1
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x520]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d.log
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x624]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d.json
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x728]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x624]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31dc
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x82c]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x41c]
mov dword [esp], eax
call dbg.IsDir
test eax, eax
jns 0x433a80
lea eax, [ebp - 0x41c]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__mkdir]
call eax
test eax, eax
jns 0x433a80
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x41c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._1107_:_Could_not_create_directory__s_due_to____d____s__.
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x5e
mov dword [esp], str.monitord_rotate_log.c
call dbg._merror_exit
lea eax, [ebp - 0x520]
mov dword [esp], eax
call dbg.IsDir
test eax, eax
jns 0x433af8
lea eax, [ebp - 0x520]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__mkdir]
call eax
test eax, eax
jns 0x433af8
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._1107_:_Could_not_create_directory__s_due_to____d____s__.
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x62
mov dword [esp], str.monitord_rotate_log.c
call dbg._merror_exit
cmp dword [ebp + 0x10], 0
jne 0x433b79
cmp dword [ebp + 0x10], 0
jne 0x433df6
cmp dword [ebp + 0x14], 0
jne 0x433df6
jmp 0x433b79
add dword [ebp - 0xc], 1
mov eax, dword [tm.tm_min]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d__03d.log
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x624]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x624]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31dc
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x82c]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x82c]
mov dword [esp], eax
call dbg.IsFile
test eax, eax
je 0x433b14
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x18]
jne 0x433d65
cmp dword [ebp + 0x18], 1
jne 0x433bda
cmp dword [ebp - 0xc], 1
jne 0x433bda
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d.log
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x624]
mov dword [esp], eax
call dbg.os_snprintf
jmp 0x433d65
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d.log.gz
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x930]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d_001.log.gz
mov dword [esp + 4], 0x104
lea eax, [tm.tm_yday]
mov dword [esp], eax
call dbg.os_snprintf
mov dword [ebp - 0xc], 1
jmp 0x433d1d
lea eax, [ebp - 0x930]
mov dword [esp + 4], eax
lea eax, [tm.tm_yday]
mov dword [esp], eax
call dbg.rename_ex
test eax, eax
je 0x433cb8
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x930]
mov dword [esp + 0x14], eax
lea eax, [tm.tm_yday]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_rename_compressed_log__s_to__s:__s
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x78
mov dword [esp], str.monitord_rotate_log.c
call dbg._merror
jmp 0x434155
add dword [ebp - 0xc], 1
lea eax, [tm.tm_yday]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31a8
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x930]
mov dword [esp], eax
call sym._snprintf_34
mov eax, dword [tm.tm_min]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d__03d.log.gz
mov dword [esp + 4], 0x104
lea eax, [tm.tm_yday]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x18]
jl 0x433c4a
mov eax, dword [ebp - 0xc]
lea edx, [eax - 1]
mov eax, dword [tm.tm_min]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d__03d.log
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x624]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x110]
mov dword [esp], eax
call dbg.IsFile
test eax, eax
jne 0x433df6
lea eax, [ebp - 0x624]
mov dword [esp + 4], eax
lea eax, [ebp - 0x110]
mov dword [esp], eax
call dbg.rename_ex
test eax, eax
jne 0x433da9
cmp dword [ebp + 8], 0
je 0x433df6
lea eax, [ebp - 0x624]
mov dword [esp], eax
call dbg.OS_CompressLog
jmp 0x433df6
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x624]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x110]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_rename__s_to__s:__s
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0x89
mov dword [esp], str.monitord_rotate_log.c
call dbg._merror
cmp dword [ebp + 0x10], 0
jne 0x433e10
cmp dword [ebp + 0x10], 0
jne 0x43411c
cmp dword [ebp + 0x14], 0
je 0x43411c
lea eax, [ebp - 0x728]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31dc
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x82c]
mov dword [esp], eax
call dbg.os_snprintf
jmp 0x433e9f
add dword [ebp - 0xc], 1
mov eax, dword [tm.tm_min]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d__03d.json
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x728]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x728]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31dc
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x82c]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x82c]
mov dword [esp], eax
call dbg.IsFile
test eax, eax
je 0x433e3a
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x18]
jne 0x43408b
cmp dword [ebp + 0x18], 1
jne 0x433f00
cmp dword [ebp - 0xc], 1
jne 0x433f00
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d.json
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x728]
mov dword [esp], eax
call dbg.os_snprintf
jmp 0x43408b
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d.json.gz
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x930]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [tm.tm_min]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d_001.json.gz
mov dword [esp + 4], 0x104
lea eax, [tm.tm_yday]
mov dword [esp], eax
call dbg.os_snprintf
mov dword [ebp - 0xc], 1
jmp 0x434043
lea eax, [ebp - 0x930]
mov dword [esp + 4], eax
lea eax, [tm.tm_yday]
mov dword [esp], eax
call dbg.rename_ex
test eax, eax
je 0x433fde
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x930]
mov dword [esp + 0x14], eax
lea eax, [tm.tm_yday]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_rename_compressed_log__s_to__s:__s
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0xa4
mov dword [esp], str.monitord_rotate_log.c
call dbg._merror
jmp 0x434155
add dword [ebp - 0xc], 1
lea eax, [tm.tm_yday]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f31a8
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x930]
mov dword [esp], eax
call sym._snprintf_34
mov eax, dword [tm.tm_min]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d__03d.json.gz
mov dword [esp + 4], 0x104
lea eax, [tm.tm_yday]
mov dword [esp], eax
call dbg.os_snprintf
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x18]
jl 0x433f70
mov eax, dword [ebp - 0xc]
lea edx, [eax - 1]
mov eax, dword [tm.tm_min]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x520]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._s_ossec__02d__03d.json
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x728]
mov dword [esp], eax
call dbg.os_snprintf
lea eax, [ebp - 0x214]
mov dword [esp], eax
call dbg.IsFile
test eax, eax
jne 0x43411c
lea eax, [ebp - 0x728]
mov dword [esp + 4], eax
lea eax, [ebp - 0x214]
mov dword [esp], eax
call dbg.rename_ex
test eax, eax
jne 0x4340cf
cmp dword [ebp + 8], 0
je 0x43411c
lea eax, [ebp - 0x728]
mov dword [esp], eax
call dbg.OS_CompressLog
jmp 0x43411c
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x728]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x214]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Couldnt_rename__s_to__s:__s
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0xb5
mov dword [esp], str.monitord_rotate_log.c
call dbg._merror
mov dword [esp + 0xc], str.Starting_new_log_after_rotation.
mov dword [esp + 8], global___func__.246
mov dword [esp + 4], 0xba
mov dword [esp], str.monitord_rotate_log.c
call dbg._minfo
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x318]
mov dword [esp], eax
call dbg.remove_old_logs
add esp, 0xa80
pop ebx
pop edi
pop ebp
ret