Function at 0x403f72
Capabilities:
Set file attributes
Write file on windows

Disassembly:
push 0x2dc
mov eax, 0x563d35
call fcn.005635af
mov ebx, ecx
mov dword [ebp - 0x174], ebx
cmp dword [ebx + 0x18], 0
jne 0x403f96
xor al, al
jmp 0x4044d5
lea eax, [ebx + 8]
push eax
lea ecx, [ebp - 0x130]
call fcn.00407617
and dword [ebp - 4], 0
lea eax, [ebp - 0x130]
cmp dword [ebp - 0x11c], 8
push 0x80
cmovae eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ecx
push ecx
lea ecx, [ebp - 0x228]
call fcn.0040829d
mov byte [ebp - 4], 1
cmp dword [ebx + 0x4c], 0
mov eax, dword [ebx + 0x44]
setne cl
and dword [ebp - 0x16c], 0
sub eax, dword [ebx + 0x40]
push 0x18
pop esi
cdq
idiv esi
mov dword [ebp - 0x178], esi
mov esi, 0x40a21a
mov byte [ebp - 0x161], cl
test eax, eax
je 0x40407e
xor edi, edi
mov esi, dword [ebx + 0x40]
lea ecx, [ebp - 0x218]
mov edx, 0x58321c
add esi, edi
call fcn.0040a076
mov edx, esi
mov ecx, eax
call fcn.0040a249
cmp byte [ebp - 0x161], 0
mov esi, 0x40a21a
push esi
je 0x404049
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ba
pop ecx
mov ecx, eax
jmp 0x40404f
lea ecx, [ebp - 0x218]
call dword [sym.imp.MSVCP120.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 0x18
pop eax
add edi, eax
mov ecx, dword [ebp - 0x16c]
mov eax, dword [ebx + 0x44]
inc ecx
sub eax, dword [ebx + 0x40]
cdq
idiv dword [ebp - 0x178]
mov dword [ebp - 0x16c], ecx
cmp ecx, eax
jb 0x40400b
mov cl, byte [ebp - 0x161]
mov eax, dword [ebx + 0x44]
sub eax, dword [ebx + 0x40]
push 0x18
cdq
pop edi
idiv edi
test eax, eax
je 0x4040b0
push esi
test cl, cl
je 0x4040a4
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ba
pop ecx
mov ecx, eax
jmp 0x4040aa
lea ecx, [ebp - 0x218]
call dword [sym.imp.MSVCP120.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_____]
mov eax, dword [ebx + 0x38]
mov esi, dword [eax]
mov dword [ebp - 0x168], esi
cmp esi, eax
je 0x404278
mov edx, 0x583220
lea ecx, [ebp - 0x218]
call fcn.0040a076
lea edx, [esi + 0x10]
mov ecx, eax
call fcn.0040a249
mov edx, 0x583218
mov ecx, eax
call fcn.0040a076
cmp byte [ebp - 0x161], 0
push 0x40a21a
je 0x404108
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ba
pop ecx
mov ecx, eax
jmp 0x40410e
lea ecx, [ebp - 0x218]
call dword [sym.imp.MSVCP120.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_____]
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x30]
push 0x18
cdq
pop ecx
idiv ecx
and dword [ebp - 0x16c], 0
test eax, eax
je 0x4041b6
mov bl, byte [ebp - 0x161]
xor ecx, ecx
mov dword [ebp - 0x170], ecx
mov edi, dword [esi + 0x30]
mov edx, 0x58321c
add edi, ecx
lea ecx, [ebp - 0x218]
call fcn.0040a076
mov edx, edi
mov ecx, eax
call fcn.0040a249
push 0x40a21a
test bl, bl
je 0x404175
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ba
pop ecx
mov ecx, eax
jmp 0x40417b
lea ecx, [ebp - 0x218]
call dword [sym.imp.MSVCP120.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_____]
mov ecx, dword [ebp - 0x170]
push 0x18
pop eax
add ecx, eax
mov edi, dword [ebp - 0x16c]
mov eax, dword [esi + 0x34]
inc edi
sub eax, dword [esi + 0x30]
cdq
idiv dword [ebp - 0x178]
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x170], ecx
cmp edi, eax
jb 0x40413d
mov ebx, dword [ebp - 0x174]
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
mov dword [ebp - 0x170], ecx
cmp ecx, eax
je 0x404233
mov bl, byte [ebp - 0x161]
lea edx, [ecx + 0x10]
lea ecx, [ebp - 0x218]
lea edi, [edx + 0x18]
call fcn.0040a249
mov edx, 0x583224
mov ecx, eax
call fcn.0040a076
mov edx, edi
mov ecx, eax
call fcn.0040a249
push 0x40a21a
test bl, bl
je 0x40420b
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ba
pop ecx
mov ecx, eax
jmp 0x404211
lea ecx, [ebp - 0x218]
call dword [sym.imp.MSVCP120.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 - 0x170]
call fcn.0040964b
mov ecx, dword [ebp - 0x170]
cmp ecx, dword [esi + 0x28]
jne 0x4041cb
mov ebx, dword [ebp - 0x174]
cmp byte [ebp - 0x161], 0
push 0x40a21a
je 0x404252
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ba
pop ecx
mov ecx, eax
jmp 0x404258
lea ecx, [ebp - 0x218]
call dword [sym.imp.MSVCP120.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 - 0x168]
call fcn.0040964b
mov esi, dword [ebp - 0x168]
cmp esi, dword [ebx + 0x38]
jne 0x4040c3
xor ebx, ebx
lea eax, [ebp - 0x117]
push 0x103
push ebx
push eax
mov byte [ebp - 0x118], bl
call sub.MSVCR120.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x118]
cmp dword [ebp - 0x11c], 8
lea eax, [ebp - 0x130]
cmovae eax, dword [ebp - 0x130]
push ebx
push ebx
push 0x104
push ecx
push dword [ebp - 0x120]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x148]
push eax
lea ecx, [ebp - 0x228]
call fcn.0040834b
push 0
push 1
lea ecx, [ebp - 0x148]
mov ebx, dword [eax + 0x10]
mov dword [ebp - 0x168], ebx
call fcn.00401d04
cmp byte [ebp - 0x161], 0
je 0x4043c4
cmp dword [ebp - 0x11c], 8
lea eax, [ebp - 0x130]
cmovae eax, dword [ebp - 0x130]
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push 7
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4044ad
push ebx
lea eax, [ebp - 0x168]
mov dword [ebp - 0x168], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push 2
push 0x583228
push edi
call ebx
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x228]
call fcn.0040834b
mov esi, eax
lea eax, [ebp - 0x148]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x228]
call fcn.0040834b
mov ecx, eax
mov eax, dword [esi + 0x10]
cmp dword [ecx + 0x14], 8
jb 0x40438a
mov ecx, dword [ecx]
push 0
lea edx, [ebp - 0x168]
add eax, eax
push edx
push eax
push ecx
push edi
call ebx
push 0
push 1
lea ecx, [ebp - 0x148]
call fcn.00401d04
push 0
push 1
lea ecx, [ebp - 0x160]
call fcn.00401d04
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4044ab
push ecx
lea ecx, [ebp - 0x2e8]
call fcn.00407ab6
push ecx
push 2
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x2e8]
call fcn.00407b56
mov eax, dword [ebp - 0x2e8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x2dc], 6
je 0x40441a
lea ecx, [ebp - 0x270]
call fcn.00407b26
lea ecx, [ebp - 0x270]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
xor bl, bl
jmp 0x4044ad
add ebx, ebx
lea esi, [ebx + 2]
push esi
call fcn.0055fe67
pop ecx
push esi
mov edi, eax
push 0
push edi
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [ebp - 0x160]
lea ecx, [ebp - 0x228]
push eax
call fcn.0040834b
cmp dword [eax + 0x14], 8
jb 0x40444e
mov eax, dword [eax]
xor ecx, ecx
push ecx
push ecx
push ebx
push edi
push dword [ebp - 0x168]
push eax
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 1
lea ecx, [ebp - 0x160]
call fcn.00401d04
lea eax, [ebp - 0x2d8]
push edi
push eax
call fcn.00409e4f
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 0xc
lea ecx, [ebp - 0x2e8]
call fcn.00407b91
lea ecx, [ebp - 0x270]
call fcn.00407b26
lea ecx, [ebp - 0x270]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov bl, 1
lea ecx, [ebp - 0x1c0]
call fcn.0040831b
lea ecx, [ebp - 0x1c0]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
push 0
push 1
lea ecx, [ebp - 0x130]
call fcn.00401d04
mov al, bl
call fcn.0056355e
ret