Function at 0x4032c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408bb2
mov eax, dword fs:[0]
push eax
sub esp, 0x434
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x2e4]
push eax
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x40332c
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
mov edx, str.Failed_to_get_Documents_folder_path.
call fcn.00405410
push 0x405640
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
jmp 0x403835
mov byte [ebp - 0x3f4], 0
lea ecx, [ebp - 0x43c]
push dword [ebp - 0x3f4]
call fcn.00406e10
mov byte [ebp - 0x3f4], 0
lea edx, [ebp - 0x2e4]
push dword [ebp - 0x3f4]
lea ecx, [ebp - 0x424]
mov dword [ebp - 4], 0
call fcn.00406da0
lea eax, [ebp - 0x43c]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x424]
lea ecx, [ebp - 0x31c]
call fcn.00401d80
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x410]
cmp ecx, 7
jbe 0x4033c8
mov edx, dword [ebp - 0x424]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4033be
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40341b
push ecx
push edx
call fcn.004079bd
add esp, 8
xor eax, eax
mov dword [ebp - 0x414], 0
mov dword [ebp - 0x410], 7
mov word [ebp - 0x424], ax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x428]
cmp ecx, 7
jbe 0x40342b
mov edx, dword [ebp - 0x43c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403421
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x403421
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004079bd
add esp, 8
xor eax, eax
mov dword [ebp - 0x42c], 0
lea ecx, [ebp - 0x31c]
mov dword [ebp - 0x428], 7
mov word [ebp - 0x43c], ax
mov byte [ebp - 4], 5
call fcn.00402980
test al, al
jne 0x4034a6
lea ecx, [ebp - 0x31c]
call fcn.00402b30
test al, al
je 0x403489
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.Created_logs_directory:
call fcn.00405410
lea edx, [ebp - 0x31c]
mov ecx, eax
call fcn.00405950
jmp 0x403499
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
mov edx, str.Failed_to_create_logs_directory._It_may_already_exist.
call fcn.00405410
push 0x405640
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
push 0
mov dword [ebp - 4], 4
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov dword [ebp - 0x2ec], eax
lea eax, [ebp - 0x2ec]
push eax
lea eax, [ebp - 0x3f0]
mov dword [ebp - 0x2e8], edx
push eax
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64_s]
push dword [ebp - 0x3f0]
mov eax, dword [ebp - 0x3e0]
push dword [ebp - 0x3ec]
inc eax
push dword [ebp - 0x3e8]
push dword [ebp - 0x3e4]
push eax
mov eax, dword [ebp - 0x3dc]
add eax, 0x76c
push eax
push str.BsLog__04d__02d__02d__02d__02d__02d.txt
lea eax, [ebp - 0xdc]
push 0x64
push eax
call fcn.00401020
mov byte [ebp - 0x3f4], 0
lea edx, [ebp - 0xdc]
push dword [ebp - 0x3f4]
lea ecx, [ebp - 0x40c]
call fcn.00406da0
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 7
push eax
lea edx, [ebp - 0x31c]
lea ecx, [ebp - 0x304]
call fcn.00401d80
add esp, 0x38
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x3f8]
cmp ecx, 7
jbe 0x403597
mov edx, dword [ebp - 0x40c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40358d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40358d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004079bd
add esp, 8
xor eax, eax
mov dword [ebp - 0x3fc], 0
push 0xb0
push eax
mov word [ebp - 0x40c], ax
lea eax, [ebp - 0x3cc]
push eax
mov dword [ebp - 0x3f8], 7
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x304]
push eax
lea ecx, [ebp - 0x3cc]
call fcn.00405a40
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x37c], 0
je 0x403763
mov edx, 0x409784
lea ecx, [ebp - 0x3cc]
call fcn.00405410
mov ecx, dword [ebp - 0x3dc]
add ecx, 0x76c
push ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov edx, 0x409780
mov ecx, eax
call fcn.00405410
mov ecx, dword [ebp - 0x3e0]
inc ecx
push ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov edx, 0x409780
mov ecx, eax
call fcn.00405410
push dword [ebp - 0x3e4]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov edx, 0x40977c
mov ecx, eax
call fcn.00405410
push dword [ebp - 0x3e8]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov edx, 0x409778
mov ecx, eax
call fcn.00405410
push dword [ebp - 0x3ec]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov edx, 0x409778
mov ecx, eax
call fcn.00405410
push dword [ebp - 0x3f0]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov edx, 0x4095c0
mov ecx, eax
call fcn.00405410
mov edx, str.Running_Processes:_n
lea ecx, [ebp - 0x3cc]
call fcn.00405410
lea ecx, [ebp - 0x40c]
call fcn.00402fb0
mov byte [ebp - 4], 0xb
cmp dword [eax + 0x14], 7
mov ecx, dword [eax + 0x10]
jbe 0x4036c8
mov eax, dword [eax]
push ecx
mov edx, eax
lea ecx, [ebp - 0x3cc]
call fcn.00406bb0
mov byte [ebp - 4], 0xa
add esp, 4
mov ecx, dword [ebp - 0x3f8]
cmp ecx, 7
jbe 0x40371f
mov edx, dword [ebp - 0x40c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403715
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x403715
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004079bd
add esp, 8
mov edx, 0x4095c0
lea ecx, [ebp - 0x3cc]
call fcn.00405410
lea ecx, [ebp - 0x3c8]
call fcn.00405030
test eax, eax
jne 0x403756
push eax
mov eax, dword [ebp - 0x3cc]
lea ecx, [ebp - 0x3cc]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::setstate_int__bool_]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.Logged_application_closure_and_running_processes_to:
jmp 0x40376e
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcerr]
mov edx, str.Error_opening_log_file_for_writing:
call fcn.00405410
lea edx, [ebp - 0x304]
mov ecx, eax
call fcn.00405950
push 0x405640
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
lea ecx, [ebp - 0x3cc]
call fcn.004038d0
mov ecx, dword [ebp - 0x2f0]
cmp ecx, 7
jbe 0x4037d8
mov edx, dword [ebp - 0x304]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4037ce
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4038c4
push ecx
push edx
call fcn.004079bd
add esp, 8
mov ecx, dword [ebp - 0x308]
xor eax, eax
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x2f0], 7
mov word [ebp - 0x304], ax
cmp ecx, 7
jbe 0x403835
mov edx, dword [ebp - 0x31c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40382b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4038c4
push ecx
push edx
call fcn.004079bd
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00407865
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3