Function at 0x402810
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40884d
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
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
mov esi, ecx
lea eax, [ebp - 0x118]
push eax
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
js 0x402f6d
xorps xmm0, xmm0
mov dword [ebp - 0x264], 0
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x260], 0
movups xmmword [ebp - 0x274], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402887
sub ecx, edx
lea eax, [ebp - 0x118]
push ecx
push eax
lea ecx, [ebp - 0x274]
call fcn.00405ef0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x260]
mov eax, edx
mov ecx, dword [ebp - 0x264]
sub eax, ecx
cmp eax, 1
jb 0x4028e6
lea eax, [ecx + 1]
cmp edx, 0xf
mov dword [ebp - 0x264], eax
lea eax, [ebp - 0x274]
cmova eax, dword [ebp - 0x274]
mov word [eax + ecx], 0x5c
lea eax, [ebp - 0x274]
jmp 0x402900
push 1
push 0x4094b0
push dword [ebp - 0x11c]
lea ecx, [ebp - 0x274]
push 1
call fcn.00406470
mov dword [ebp - 0x248], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x258], xmm0
mov dword [ebp - 0x244], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x258], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x248], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
push esi
lea edx, [ebp - 0x258]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x168]
call fcn.00405120
add esp, 4
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x244]
cmp ecx, 0xf
jbe 0x402999
mov edx, dword [ebp - 0x258]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40298f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029e4
push ecx
push edx
call fcn.00407654
add esp, 8
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 0xf
mov byte [ebp - 0x258], 0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x260]
cmp ecx, 0xf
jbe 0x4029f4
mov edx, dword [ebp - 0x274]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4029ea
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4029ea
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407654
add esp, 8
mov byte [ebp - 0x240], 0
lea edx, [ebp - 0x168]
push dword [ebp - 0x240]
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x260], 0xf
mov byte [ebp - 0x274], 0
call fcn.00406900
add esp, 4
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 5
call fcn.004025c0
test al, al
jne 0x402b37
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 6
call fcn.004027d0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Folder_created:
call fcn.00405370
mov esi, eax
lea eax, [ebp - 0x258]
push ecx
push eax
lea ecx, [ebp - 0x150]
call fcn.004051d0
mov byte [ebp - 4], 7
lea edx, [ebp - 0x258]
cmp dword [ebp - 0x244], 0xf
mov ecx, esi
push dword [ebp - 0x248]
cmova edx, dword [ebp - 0x258]
call fcn.00406940
add esp, 4
mov ecx, eax
push 0x405590
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x244]
cmp ecx, 0xf
jbe 0x402af0
mov edx, dword [ebp - 0x258]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402ae6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402ae6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407654
add esp, 8
mov dword [ebp - 4], 5
jmp 0x402bd1
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Folder_already_exists:
call fcn.00405370
mov esi, eax
lea eax, [ebp - 0x258]
push ecx
push eax
lea ecx, [ebp - 0x150]
call fcn.004051d0
mov byte [ebp - 4], 9
lea edx, [ebp - 0x258]
cmp dword [ebp - 0x244], 0xf
mov ecx, esi
push dword [ebp - 0x248]
cmova edx, dword [ebp - 0x258]
call fcn.00406940
add esp, 4
mov ecx, eax
push 0x405590
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x244]
cmp ecx, 0xf
jbe 0x402bd1
mov edx, dword [ebp - 0x258]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402bc7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402bc7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407654
add esp, 8
mov ecx, dword [ebp - 0x158]
mov eax, 0x7fffffff
sub eax, ecx
mov dword [ebp - 0x25c], ecx
cmp eax, 9
jb 0x402fa6
cmp dword [ebp - 0x154], 0xf
lea eax, [ebp - 0x168]
lea edx, [ecx + 9]
mov dword [ebp - 0x128], 0
cmova eax, dword [ebp - 0x168]
lea edi, [ebp - 0x138]
mov esi, 0xf
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x124], 0
xorps xmm0, xmm0
mov dword [ebp - 0x240], edx
movups xmmword [ebp - 0x138], xmm0
cmp edx, esi
jbe 0x402cc3
mov esi, edx
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x402c77
mov ecx, 0x80000000
mov esi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.0040750a
add esp, 4
test eax, eax
je 0x402f5b
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x402cab
mov eax, 0x16
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
test eax, eax
jne 0x402c8c
xor edi, edi
jmp 0x402cb7
cmp eax, 0x1000
jb 0x402ca0
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x402fab
jmp 0x402c5b
push eax
call fcn.0040750a
add esp, 4
mov edi, eax
mov edx, dword [ebp - 0x240]
mov ecx, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x11c]
mov dword [ebp - 0x138], edi
push ecx
push eax
push edi
mov dword [ebp - 0x128], edx
mov dword [ebp - 0x124], esi
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x25c]
movq xmm0, qword [str.logs.txt]
movq qword [edi + ecx], xmm0
mov al, byte [0x409500]
mov byte [edi + ecx + 8], al
mov byte [edi + ecx + 9], 0
push 0xb0
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 0xa
push 0
push eax
call sub.VCRUNTIME140.dll_memset
cmp dword [ebp - 0x124], 0xf
lea eax, [ebp - 0x138]
lea ecx, [ebp - 0x218]
cmova eax, dword [ebp - 0x138]
add esp, 0xc
push eax
call fcn.00404f30
mov eax, dword [ebp - 0x218]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x218]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x21c], eax
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x1c8], 0
je 0x402e59
call dword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
push 0
push 0x989680
push edx
push eax
call fcn.004084c0
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x11c], edx
push eax
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64_s]
add esp, 8
lea ecx, [ebp - 0x218]
mov edx, str.Log_created_on:
call fcn.00405370
lea ecx, [ebp - 0x23c]
mov dword [ebp - 0x264], str._Y__m__d__H:_M:_S
mov dword [ebp - 0x268], ecx
mov ecx, str._Y__m__d__H:_M:_S
mov dword [ebp - 0x260], str._Y__m__d__H:_M:_S
inc ecx
cmp byte [ecx], 0
jne 0x402dd6
mov dword [ebp - 0x260], ecx
lea edx, [ebp - 0x268]
mov ecx, eax
call fcn.004055c0
push 0x405590
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp - 0x214]
call fcn.00404e90
test eax, eax
jne 0x402e23
push eax
mov eax, dword [ebp - 0x218]
lea ecx, [ebp - 0x218]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Log_file_created:
call fcn.00405370
cmp dword [ebp - 0x124], 0xf
lea edx, [ebp - 0x138]
push dword [ebp - 0x128]
cmova edx, dword [ebp - 0x138]
mov ecx, eax
call fcn.00406940
add esp, 4
jmp 0x402e69
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Error_creating_log_file.
call fcn.00405370
push 0x405590
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea ecx, [ebp - 0x218]
call fcn.00402fc0
mov ecx, dword [ebp - 0x124]
cmp ecx, 0xf
jbe 0x402ebb
mov edx, dword [ebp - 0x138]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402eb1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f5b
push ecx
push edx
call fcn.00407654
add esp, 8
mov ecx, dword [ebp - 0x13c]
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], 0xf
mov byte [ebp - 0x138], 0
cmp ecx, 7
jbe 0x402f12
mov edx, dword [ebp - 0x150]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402f08
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f5b
push ecx
push edx
call fcn.00407654
add esp, 8
mov ecx, dword [ebp - 0x154]
xor eax, eax
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x13c], 7
mov word [ebp - 0x150], ax
cmp ecx, 0xf
jbe 0x402f8a
mov edx, dword [ebp - 0x168]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402f61
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402f61
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407654
add esp, 8
jmp 0x402f8a
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_get_the_Documents_folder_path.
call fcn.00405370
push 0x405590
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
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.004074fc
mov esp, ebp
pop ebp
ret
call fcn.00401170
call fcn.004010d0
int3