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

Disassembly:
push 0x2dc
mov eax, 0x56197a
call fcn.00561213
mov ebx, ecx
mov dword [ebp - 0x174], ebx
cmp dword [ebx + 0x18], 0
jne 0x403fc0
xor al, al
jmp 0x4044ff
lea eax, [ebx + 8]
push eax
lea ecx, [ebp - 0x130]
call fcn.00407797
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.0040841d
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, 0x40a341
mov byte [ebp - 0x161], cl
test eax, eax
je 0x4040a8
xor edi, edi
mov esi, dword [ebx + 0x40]
lea ecx, [ebp - 0x218]
mov edx, 0x57f228
add esi, edi
call fcn.0040a19d
mov edx, esi
mov ecx, eax
call fcn.0040a370
cmp byte [ebp - 0x161], 0
mov esi, 0x40a341
push esi
je 0x404073
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a4e1
pop ecx
mov ecx, eax
jmp 0x404079
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 0x404035
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 0x4040da
push esi
test cl, cl
je 0x4040ce
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a4e1
pop ecx
mov ecx, eax
jmp 0x4040d4
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 0x4042a2
mov edx, 0x57f22c
lea ecx, [ebp - 0x218]
call fcn.0040a19d
lea edx, [esi + 0x10]
mov ecx, eax
call fcn.0040a370
mov edx, 0x57f224
mov ecx, eax
call fcn.0040a19d
cmp byte [ebp - 0x161], 0
push 0x40a341
je 0x404132
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a4e1
pop ecx
mov ecx, eax
jmp 0x404138
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 0x4041e0
mov bl, byte [ebp - 0x161]
xor ecx, ecx
mov dword [ebp - 0x170], ecx
mov edi, dword [esi + 0x30]
mov edx, 0x57f228
add edi, ecx
lea ecx, [ebp - 0x218]
call fcn.0040a19d
mov edx, edi
mov ecx, eax
call fcn.0040a370
push 0x40a341
test bl, bl
je 0x40419f
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a4e1
pop ecx
mov ecx, eax
jmp 0x4041a5
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 0x404167
mov ebx, dword [ebp - 0x174]
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
mov dword [ebp - 0x170], ecx
cmp ecx, eax
je 0x40425d
mov bl, byte [ebp - 0x161]
lea edx, [ecx + 0x10]
lea ecx, [ebp - 0x218]
lea edi, [edx + 0x18]
call fcn.0040a370
mov edx, 0x57f230
mov ecx, eax
call fcn.0040a19d
mov edx, edi
mov ecx, eax
call fcn.0040a370
push 0x40a341
test bl, bl
je 0x404235
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a4e1
pop ecx
mov ecx, eax
jmp 0x40423b
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.004097a9
mov ecx, dword [ebp - 0x170]
cmp ecx, dword [esi + 0x28]
jne 0x4041f5
mov ebx, dword [ebp - 0x174]
cmp byte [ebp - 0x161], 0
push 0x40a341
je 0x40427c
push ecx
lea ecx, [ebp - 0x218]
call fcn.0040a4e1
pop ecx
mov ecx, eax
jmp 0x404282
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.004097a9
mov esi, dword [ebp - 0x168]
cmp esi, dword [ebx + 0x38]
jne 0x4040ed
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.004084cb
push 0
push 1
lea ecx, [ebp - 0x148]
mov ebx, dword [eax + 0x10]
mov dword [ebp - 0x168], ebx
call fcn.00401d84
cmp byte [ebp - 0x161], 0
je 0x4043ee
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 0x4044d7
push ebx
lea eax, [ebp - 0x168]
mov dword [ebp - 0x168], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push 2
push 0x57f234
push edi
call ebx
lea eax, [ebp - 0x160]
push eax
lea ecx, [ebp - 0x228]
call fcn.004084cb
mov esi, eax
lea eax, [ebp - 0x148]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x228]
call fcn.004084cb
mov ecx, eax
mov eax, dword [esi + 0x10]
cmp dword [ecx + 0x14], 8
jb 0x4043b4
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.00401d84
push 0
push 1
lea ecx, [ebp - 0x160]
call fcn.00401d84
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4044d5
push ecx
lea ecx, [ebp - 0x2e8]
call fcn.00407c36
push ecx
push 2
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x2e8]
call fcn.00407cd6
mov eax, dword [ebp - 0x2e8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x2dc], 6
je 0x404444
lea ecx, [ebp - 0x270]
call fcn.00407ca6
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 0x4044d7
add ebx, ebx
lea esi, [ebx + 2]
push esi
call fcn.0055da37
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.004084cb
cmp dword [eax + 0x14], 8
jb 0x404478
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.00401d84
lea eax, [ebp - 0x2d8]
push edi
push eax
call fcn.00409f76
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 0xc
lea ecx, [ebp - 0x2e8]
call fcn.00407d11
lea ecx, [ebp - 0x270]
call fcn.00407ca6
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.0040849b
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.00401d84
mov al, bl
call fcn.005611c2
ret