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

Disassembly:
push 0x2dc
mov eax, 0x552fe5
call fcn.0054f7e3
mov ebx, ecx
mov dword [ebp - 0x174], ebx
cmp dword [ebx + 0x18], 0
jne 0x403f43
xor al, al
jmp 0x404482
lea eax, [ebx + 8]
push eax
lea ecx, [ebp - 0x130]
call fcn.0040764c
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.00408358
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, 0x40a24e
mov byte [ebp - 0x161], cl
test eax, eax
je 0x40402b
xor edi, edi
mov esi, dword [ebx + 0x40]
lea ecx, [ebp - 0x218]
mov edx, 0x570178
add esi, edi
call fcn.0040a09f
mov edx, esi
mov ecx, eax
call fcn.0040a27d
cmp byte [ebp - 0x161], 0
mov esi, 0x40a24e
push esi
je 0x403ff6
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ee
pop ecx
mov ecx, eax
jmp 0x403ffc
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 0x403fb8
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 0x40405d
push esi
test cl, cl
je 0x404051
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ee
pop ecx
mov ecx, eax
jmp 0x404057
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 0x404225
mov edx, 0x57017c
lea ecx, [ebp - 0x218]
call fcn.0040a09f
lea edx, [esi + 0x10]
mov ecx, eax
call fcn.0040a27d
mov edx, 0x570174
mov ecx, eax
call fcn.0040a09f
cmp byte [ebp - 0x161], 0
push 0x40a24e
je 0x4040b5
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ee
pop ecx
mov ecx, eax
jmp 0x4040bb
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 0x404163
mov bl, byte [ebp - 0x161]
xor ecx, ecx
mov dword [ebp - 0x170], ecx
mov edi, dword [esi + 0x30]
mov edx, 0x570178
add edi, ecx
lea ecx, [ebp - 0x218]
call fcn.0040a09f
mov edx, edi
mov ecx, eax
call fcn.0040a27d
push 0x40a24e
test bl, bl
je 0x404122
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ee
pop ecx
mov ecx, eax
jmp 0x404128
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 0x4040ea
mov ebx, dword [ebp - 0x174]
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
mov dword [ebp - 0x170], ecx
cmp ecx, eax
je 0x4041e0
mov bl, byte [ebp - 0x161]
lea edx, [ecx + 0x10]
lea ecx, [ebp - 0x218]
lea edi, [edx + 0x18]
call fcn.0040a27d
mov edx, 0x570180
mov ecx, eax
call fcn.0040a09f
mov edx, edi
mov ecx, eax
call fcn.0040a27d
push 0x40a24e
test bl, bl
je 0x4041b8
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ee
pop ecx
mov ecx, eax
jmp 0x4041be
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.00409669
mov ecx, dword [ebp - 0x170]
cmp ecx, dword [esi + 0x28]
jne 0x404178
mov ebx, dword [ebp - 0x174]
cmp byte [ebp - 0x161], 0
push 0x40a24e
je 0x4041ff
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a3ee
pop ecx
mov ecx, eax
jmp 0x404205
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.00409669
mov esi, dword [ebp - 0x168]
cmp esi, dword [ebx + 0x38]
jne 0x404070
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.00408406
push 0
push 1
lea ecx, [ebp - 0x148]
mov ebx, dword [eax + 0x10]
mov dword [ebp - 0x168], ebx
call fcn.00401c9b
cmp byte [ebp - 0x161], 0
je 0x404371
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 0x40445a
push ebx
lea eax, [ebp - 0x168]
mov dword [ebp - 0x168], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push 2
push 0x570184
push edi
call ebx
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x228]
call fcn.00408406
mov esi, eax
lea eax, [ebp - 0x148]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x228]
call fcn.00408406
mov ecx, eax
mov eax, dword [esi + 0x10]
cmp dword [ecx + 0x14], 8
jb 0x404337
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.00401c9b
push 0
push 1
lea ecx, [ebp - 0x160]
call fcn.00401c9b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404458
push ecx
lea ecx, [ebp - 0x2e8]
call fcn.00407af7
push ecx
push 2
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x2e8]
call fcn.00407bc2
mov eax, dword [ebp - 0x2e8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x2dc], 6
je 0x4043c7
lea ecx, [ebp - 0x270]
call fcn.00407b92
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 0x40445a
add ebx, ebx
lea esi, [ebx + 2]
push esi
call fcn.0054e5c7
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.00408406
cmp dword [eax + 0x14], 8
jb 0x4043fb
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.00401c9b
lea eax, [ebp - 0x2d8]
push edi
push eax
call fcn.00409e6d
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 0xc
lea ecx, [ebp - 0x2e8]
call fcn.00407c4c
lea ecx, [ebp - 0x270]
call fcn.00407b92
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.004083d6
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.00401c9b
mov al, bl
call fcn.0054f792
ret