Function at 0x402110
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42320d
mov eax, dword fs:[0]
push eax
sub esp, 0x4cc
mov eax, dword [0x43304c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push 0
push 0x1a
lea eax, [ebp - 0x218]
mov dword [ebp - 0x424], 0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x42f6c8
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0040fd36
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0040fdab
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x42f6d8
push 0x104
push eax
call fcn.0040fd36
mov esi, ebx
add esp, 0xc
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4021b0
sub esi, ecx
sar esi, 1
inc esi
push esi
call fcn.0040c82c
add esp, 4
mov edi, eax
lea eax, [ebp - 0x428]
push esi
push ebx
push esi
push edi
push eax
call fcn.0040d1b9
add esp, 0x14
lea eax, [ebp - 0x420]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x4d8], 0x42fb48
mov dword [ebp - 0x468], 0
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x440], 0
push ecx
mov dword [ebp - 4], 0
lea eax, [ebp - 0x4d4]
push eax
lea ecx, [ebp - 0x470]
mov dword [ebp - 0x424], 1
mov dword [ebp - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov dword [ebp - 0x474], 0x60
call fcn.00405680
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x4d8]
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 - 0x4d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4dc], eax
lea ecx, [ebp - 0x4d4]
call fcn.004052d0
push ecx
push 2
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 3
push eax
lea ecx, [ebp - 0x4d4]
call fcn.00405210
test eax, eax
lea ecx, [ebp - 0x4d8]
mov eax, dword [ebp - 0x4d8]
mov eax, dword [eax + 4]
je 0x4022d0
add ecx, eax
xor edx, edx
mov eax, 4
cmp dword [ecx + 0x38], edx
cmovne eax, edx
jmp 0x4022e4
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push 0
push eax
call fcn.00407080
mov eax, dword [ebp - 0x4d8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x4cc], 6
jne 0x402367
mov edx, edi
lea ecx, [ebp - 0x4d8]
call fcn.004057e0
lea ecx, [ebp - 0x4d4]
call fcn.00405140
test eax, eax
jne 0x402346
mov eax, dword [ebp - 0x4d8]
lea ecx, [ebp - 0x4d8]
push 0
mov eax, dword [eax + 4]
add ecx, eax
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.00407080
push str.id.txt
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402360
push str.id.txt
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, 1
jmp 0x402369
xor esi, esi
push edi
call fcn.0040c837
mov eax, dword [ebp - 0x4d8]
add esp, 4
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 - 0x4d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4dc], eax
lea ecx, [ebp - 0x4d4]
call fcn.00404480
mov eax, dword [ebp - 0x4d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x4d8]
mov edx, dword [eax + 4]
lea ecx, [edx - 8]
mov dword [ebp + edx - 0x4dc], ecx
lea eax, [ebp - 0x470]
mov dword [ebp - 4], 4
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00407798
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004082ae
mov esp, ebp
pop ebp
ret