Function at 0x403534
Capabilities:
Check if file exists
Get file attributes
Get file size
Move file
Read file on windows
Set file attributes

Disassembly:
push 0xa98
mov eax, 0x561926
call fcn.00561213
mov edi, ecx
mov dword [ebp - 0x92c], edi
lea esi, [edi + 8]
cmp dword [esi + 0x14], 8
jb 0x403558
mov eax, dword [esi]
jmp 0x40355a
mov eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x4035a1
add edi, 0x20
cmp dword [edi + 0x14], 8
jb 0x403575
mov eax, dword [edi]
jmp 0x403577
mov eax, edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x40359b
cmp dword [esi + 0x14], 8
jb 0x403589
mov eax, dword [esi]
jmp 0x40358b
mov eax, esi
cmp dword [edi + 0x14], 8
jb 0x403593
mov edi, dword [edi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov edi, dword [ebp - 0x92c]
cmp dword [esi + 0x14], 8
jb 0x4035ab
mov eax, dword [esi]
jmp 0x4035ad
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, esi
call fcn.0040337b
push ecx
lea ecx, [ebp - 0x9f4]
mov dword [edi + 0x4c], eax
call fcn.00407c36
push ecx
push ecx
xor ebx, ebx
lea ecx, [ebp - 0xaa4]
mov dword [ebp - 4], ebx
call fcn.0040841d
mov dword [ebp - 0x848], 0xf
mov dword [ebp - 0x84c], ebx
mov byte [ebp - 0x85c], bl
push 7
pop ecx
xor eax, eax
mov dword [ebp - 0x830], ecx
mov dword [ebp - 0x834], ebx
mov word [ebp - 0x844], ax
mov dword [ebp - 0x818], ecx
mov dword [ebp - 0x81c], ebx
mov word [ebp - 0x82c], ax
mov dword [ebp - 0x890], ecx
mov dword [ebp - 0x894], ebx
mov word [ebp - 0x8a4], ax
mov dword [ebp - 0x878], ecx
mov dword [ebp - 0x87c], ebx
mov word [ebp - 0x88c], ax
mov dword [ebp - 0x860], ecx
mov dword [ebp - 0x864], ebx
mov word [ebp - 0x874], ax
push 0x800
lea eax, [ebp - 0x814]
mov byte [ebp - 4], cl
push ebx
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x40367d
mov eax, dword [esi]
jmp 0x40367f
mov eax, esi
push ebx
push ebx
push 0x800
lea ecx, [ebp - 0x814]
push ecx
push dword [edi + 0x18]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [edi + 0x4c]
xor ebx, ebx
push 2
inc ebx
pop ecx
test eax, eax
jne 0x4036fe
push ecx
push ebx
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x9f4]
call fcn.00407cd6
mov eax, dword [ebp - 0x9f4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x9e8], 6
jne 0x403ec6
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a177
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
and al, 6
neg al
sbb al, al
inc al
mov dword [ebp - 0x924], eax
jmp 0x403d15
cmp eax, ebx
jne 0x40385f
cmp dword [esi + 0x14], 8
jb 0x40370e
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 7
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x930], eax
cmp eax, 0xffffffff
je 0x403ec6
and dword [ebp - 0x934], 0
lea ecx, [ebp - 0x934]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4037b2
lea ecx, [esi + 2]
push ecx
call fcn.0055da37
pop ecx
xor ecx, ecx
mov dword [ebp - 0x924], eax
push ecx
mov word [eax + esi], cx
mov dword [ebp - 0x928], ecx
lea ecx, [ebp - 0x928]
push ecx
push esi
push eax
push dword [ebp - 0x930]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp - 0x924]
test eax, eax
je 0x4037aa
push 0x40a341
push ecx
lea edx, [esi + 2]
lea ecx, [ebp - 0xa94]
call fcn.0040a19d
pop ecx
mov ecx, eax
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 esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
pop ecx
push dword [ebp - 0x930]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xaa4]
lea ecx, [ebp - 0xaa4]
push 0xa
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_wchar_t___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::widen_char_const]
movzx eax, ax
lea edx, [ebp - 0x844]
push eax
lea ecx, [ebp - 0xaa4]
call fcn.0040c254
pop ecx
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
and al, 6
neg al
sbb al, al
inc al
cmp dword [ebp - 0x834], 0
mov byte [ebp - 0x924], al
je 0x403987
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x844]
cmp word [eax], cx
jne 0x403987
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
lea ecx, [ebp - 0x844]
cmovae eax, dword [ebp - 0x844]
push eax
lea eax, [ebp - 0x928]
push eax
call fcn.00407839
jmp 0x403987
cmp eax, ecx
jne 0x403ea9
push ecx
push ebx
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x9f4]
call fcn.00407cd6
mov eax, dword [ebp - 0x9f4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x9e8], 6
jne 0x403ec6
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a177
mov esi, dword [ebp - 0x84c]
push 2
pop edx
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
and al, 6
neg al
sbb al, al
inc esi
inc al
xor ecx, ecx
mov byte [ebp - 0x924], al
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0055da37
pop ecx
lea ecx, [esi + esi]
mov dword [ebp - 0x928], eax
push ecx
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x85c]
cmp dword [ebp - 0x848], 0x10
cmovae ecx, dword [ebp - 0x85c]
push esi
mov esi, dword [ebp - 0x928]
push esi
push dword [ebp - 0x84c]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, esi
call fcn.00401601
push eax
push esi
lea ecx, [ebp - 0x844]
call fcn.00402021
cmp dword [ebp - 0x834], 0
je 0x40397f
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x844]
cmp word [eax], cx
jne 0x40397f
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
lea ecx, [ebp - 0x844]
cmovae eax, dword [ebp - 0x844]
push eax
lea eax, [ebp - 0x928]
push eax
call fcn.00407839
push esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
pop ecx
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x844]
push eax
lea ecx, [ebp - 0x82c]
call fcn.00401f92
jmp 0x403e9c
cmp dword [ebp - 0x81c], 0
je 0x403cdf
push 9
lea ecx, [ebp - 0x82c]
call fcn.00404902
mov ecx, dword [ebp - 0x818]
lea eax, [ebp - 0x82c]
mov edx, dword [ebp - 0x82c]
cmp ecx, 8
mov esi, dword [ebp - 0x81c]
cmovae eax, edx
cmp word [eax + esi*2 - 2], 0xd
jne 0x403a20
lea eax, [esi - 1]
push eax
push 0
lea eax, [ebp - 0x8bc]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040789a
push eax
lea ecx, [ebp - 0x82c]
call fcn.00407814
push 0
push ebx
lea ecx, [ebp - 0x8bc]
call fcn.00401d84
mov ecx, dword [ebp - 0x818]
mov edx, dword [ebp - 0x82c]
cmp dword [ebp - 0x81c], 0
je 0x403cdf
cmp ecx, 8
lea eax, [ebp - 0x82c]
cmovae eax, edx
movzx eax, word [eax]
push eax
call dword [sym.imp.MSVCR120.dll_iswprint]
pop ecx
test eax, eax
je 0x403f5d
mov esi, 0x57f218
mov ecx, esi
call fcn.00401601
push eax
push 0
push esi
lea ecx, [ebp - 0x82c]
call fcn.00408e86
mov esi, eax
cmp esi, 0xffffffff
je 0x403cdf
cmp dword [ebp - 0x818], 8
lea ecx, [ebp - 0x82c]
cmovae ecx, dword [ebp - 0x82c]
movzx eax, word [ecx + esi*2]
sub eax, 0x23
je 0x403c56
push 0x18
pop ecx
sub eax, ecx
je 0x403c56
push 2
pop ecx
sub eax, ecx
je 0x403b23
sub eax, 0x1e
jne 0x403ce2
mov ecx, 0x57f224
call fcn.00401601
push eax
push 0xffffffffffffffff
push 0x57f224
lea ecx, [ebp - 0x82c]
call fcn.00408eff
cmp eax, 0xffffffff
je 0x403cdf
cmp eax, esi
jbe 0x403cdf
sub eax, esi
lea ecx, [ebp - 0x82c]
dec eax
push eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x8bc]
push eax
call fcn.0040789a
push eax
lea ecx, [ebp - 0x8a4]
call fcn.00407814
push 0
push ebx
lea ecx, [ebp - 0x8bc]
call fcn.00401d84
lea eax, [ebp - 0x8a4]
mov ecx, edi
push eax
call fcn.004045ae
jmp 0x403cdf
push esi
push 0
lea eax, [ebp - 0x8d4]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040789a
push eax
lea ecx, [ebp - 0x88c]
call fcn.00407814
push 0
push ebx
lea ecx, [ebp - 0x8d4]
call fcn.00401d84
push 0xffffffffffffffff
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x8ec]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040789a
push eax
lea ecx, [ebp - 0x874]
call fcn.00407814
push 0
push ebx
lea ecx, [ebp - 0x8ec]
call fcn.00401d84
cmp dword [ebp - 0x87c], 0
je 0x403bdc
push 0x20
lea ecx, [ebp - 0x88c]
call fcn.00404902
cmp dword [ebp - 0x87c], 0
je 0x403bdc
push 0x20
lea ecx, [ebp - 0x88c]
call fcn.0040493b
cmp dword [ebp - 0x87c], 0
je 0x403bdc
push 9
lea ecx, [ebp - 0x88c]
call fcn.00404902
cmp dword [ebp - 0x87c], 0
je 0x403bdc
push 9
lea ecx, [ebp - 0x88c]
call fcn.0040493b
cmp dword [ebp - 0x864], 0
je 0x403c34
push 0x20
lea ecx, [ebp - 0x874]
call fcn.00404902
cmp dword [ebp - 0x864], 0
je 0x403c34
push 0x20
lea ecx, [ebp - 0x874]
call fcn.0040493b
cmp dword [ebp - 0x864], 0
je 0x403c34
push 9
lea ecx, [ebp - 0x874]
call fcn.00404902
cmp dword [ebp - 0x864], 0
je 0x403c34
push 9
lea ecx, [ebp - 0x874]
call fcn.0040493b
push ecx
lea eax, [ebp - 0x874]
mov ecx, edi
push eax
lea eax, [ebp - 0x88c]
push eax
lea eax, [ebp - 0x8a4]
push eax
call fcn.004047fd
jmp 0x403cdf
cmp dword [edi + 0x3c], 0
lea eax, [esi + 1]
push 0xffffffffffffffff
lea ecx, [ebp - 0x82c]
push eax
jne 0x403c96
lea eax, [ebp - 0x91c]
push eax
call fcn.0040789a
push eax
lea ecx, [edi + 0x40]
mov byte [ebp - 4], 8
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
push 0x18
cdq
pop esi
idiv esi
inc eax
push eax
call fcn.004078d2
lea ecx, [ebp - 0x91c]
jmp 0x403cd3
lea eax, [ebp - 0x904]
push eax
call fcn.0040789a
mov esi, eax
lea eax, [ebp - 0x8a4]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x928]
mov ecx, edi
push eax
call fcn.00404505
mov eax, dword [eax]
cmp eax, dword [edi + 0x38]
je 0x403ccd
lea ecx, [eax + 0x30]
push esi
call fcn.004079a0
lea ecx, [ebp - 0x904]
push 0
push ebx
mov byte [ebp - 4], 7
call fcn.00401d84
push 2
pop ecx
mov eax, dword [edi + 0x4c]
test eax, eax
jne 0x403d8c
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a177
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
and al, 6
neg al
sbb al, al
inc al
mov byte [ebp - 0x924], al
mov esi, dword [ebp - 0x84c]
xor ecx, ecx
inc esi
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0055da37
pop ecx
lea ecx, [esi + esi]
mov edi, eax
push ecx
push 0
push edi
call sub.MSVCR120.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x85c]
cmp dword [ebp - 0x848], 0x10
cmovae ecx, dword [ebp - 0x85c]
push esi
push edi
push dword [ebp - 0x84c]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, edi
call fcn.00401601
push eax
push edi
lea ecx, [ebp - 0x82c]
call fcn.00402021
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
pop ecx
jmp 0x403e96
cmp eax, ebx
jne 0x403ddb
mov eax, dword [ebp - 0xaa4]
lea ecx, [ebp - 0xaa4]
push 0xa
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_wchar_t___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::widen_char_const]
movzx eax, ax
lea edx, [ebp - 0x844]
push eax
lea ecx, [ebp - 0xaa4]
call fcn.0040c254
pop ecx
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
and al, 6
neg al
sbb al, al
inc al
mov byte [ebp - 0x924], al
jmp 0x403987
cmp eax, ecx
jne 0x403e9c
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a177
mov esi, dword [ebp - 0x84c]
push 2
pop edx
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
and al, 6
neg al
sbb al, al
inc esi
inc al
xor ecx, ecx
mov byte [ebp - 0x924], al
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0055da37
pop ecx
lea ecx, [esi + esi]
mov edi, eax
push ecx
push 0
push edi
call sub.MSVCR120.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x85c]
cmp dword [ebp - 0x848], 0x10
cmovae ecx, dword [ebp - 0x85c]
push esi
push edi
push dword [ebp - 0x84c]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, edi
call fcn.00401601
push eax
push edi
lea ecx, [ebp - 0x844]
call fcn.00402021
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
pop ecx
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x844]
push eax
lea ecx, [ebp - 0x82c]
call fcn.00401f92
mov edi, dword [ebp - 0x92c]
cmp byte [ebp - 0x924], 0
jne 0x4039a2
cmp dword [edi + 0x4c], 0
jne 0x403eba
lea ecx, [ebp - 0x9f4]
call fcn.00407d11
cmp dword [edi + 0x3c], 0
mov byte [ebp - 0x91d], bl
jne 0x403ecd
mov byte [ebp - 0x91d], 0
push 0
push ebx
lea ecx, [ebp - 0x874]
call fcn.00401d84
push 0
push ebx
lea ecx, [ebp - 0x88c]
call fcn.00401d84
push 0
push ebx
lea ecx, [ebp - 0x8a4]
call fcn.00401d84
push 0
push ebx
lea ecx, [ebp - 0x82c]
call fcn.00401d84
push 0
push ebx
lea ecx, [ebp - 0x844]
call fcn.00401d84
push 0
push ebx
lea ecx, [ebp - 0x85c]
call fcn.00401d3f
lea ecx, [ebp - 0xa3c]
call fcn.0040849b
lea ecx, [ebp - 0xa3c]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x97c]
call fcn.00407ca6
lea ecx, [ebp - 0x97c]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov al, byte [ebp - 0x91d]
call fcn.005611c2
ret 4
cmp dword [ebp - 0x818], 8
lea eax, [ebp - 0x82c]
cmovae eax, dword [ebp - 0x82c]
movzx eax, word [eax]
push eax
push str.Failing_on_char__d_n
call dword [sym.imp.MSVCR120.dll_wprintf]
cmp dword [edi + 0x4c], 0
pop ecx
pop ecx
jne 0x403ec6
lea ecx, [ebp - 0x9f4]
call fcn.00407d11
jmp 0x403ec6