Function at 0x40350a
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, 0x563ce1
call fcn.005635af
mov edi, ecx
mov dword [ebp - 0x92c], edi
lea esi, [edi + 8]
cmp dword [esi + 0x14], 8
jb 0x40352e
mov eax, dword [esi]
jmp 0x403530
mov eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x403577
add edi, 0x20
cmp dword [edi + 0x14], 8
jb 0x40354b
mov eax, dword [edi]
jmp 0x40354d
mov eax, edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x403571
cmp dword [esi + 0x14], 8
jb 0x40355f
mov eax, dword [esi]
jmp 0x403561
mov eax, esi
cmp dword [edi + 0x14], 8
jb 0x403569
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 0x403581
mov eax, dword [esi]
jmp 0x403583
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, esi
call fcn.00403351
push ecx
lea ecx, [ebp - 0x9f4]
mov dword [edi + 0x4c], eax
call fcn.00407ab6
push ecx
push ecx
xor ebx, ebx
lea ecx, [ebp - 0xaa4]
mov dword [ebp - 4], ebx
call fcn.0040829d
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 0x403653
mov eax, dword [esi]
jmp 0x403655
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 0x4036d4
push ecx
push ebx
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x9f4]
call fcn.00407b56
mov eax, dword [ebp - 0x9f4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x9e8], 6
jne 0x403e9c
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a050
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 0x403ceb
cmp eax, ebx
jne 0x403835
cmp dword [esi + 0x14], 8
jb 0x4036e4
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 0x403e9c
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 0x403788
lea ecx, [esi + 2]
push ecx
call fcn.0055fe67
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 0x403780
push 0x40a21a
push ecx
lea edx, [esi + 2]
lea ecx, [ebp - 0xa94]
call fcn.0040a076
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.0040c164
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 0x40395d
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x844]
cmp word [eax], cx
jne 0x40395d
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.004076b9
jmp 0x40395d
cmp eax, ecx
jne 0x403e7f
push ecx
push ebx
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x9f4]
call fcn.00407b56
mov eax, dword [ebp - 0x9f4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x9e8], 6
jne 0x403e9c
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a050
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.0055fe67
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.00401581
push eax
push esi
lea ecx, [ebp - 0x844]
call fcn.00401fa1
cmp dword [ebp - 0x834], 0
je 0x403955
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x844]
cmp word [eax], cx
jne 0x403955
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.004076b9
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.00401f12
jmp 0x403e72
cmp dword [ebp - 0x81c], 0
je 0x403cb5
push 9
lea ecx, [ebp - 0x82c]
call fcn.004048d8
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 0x4039f6
lea eax, [esi - 1]
push eax
push 0
lea eax, [ebp - 0x8bc]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040771a
push eax
lea ecx, [ebp - 0x82c]
call fcn.00407694
push 0
push ebx
lea ecx, [ebp - 0x8bc]
call fcn.00401d04
mov ecx, dword [ebp - 0x818]
mov edx, dword [ebp - 0x82c]
cmp dword [ebp - 0x81c], 0
je 0x403cb5
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 0x403f33
mov esi, 0x58320c
mov ecx, esi
call fcn.00401581
push eax
push 0
push esi
lea ecx, [ebp - 0x82c]
call fcn.00408d06
mov esi, eax
cmp esi, 0xffffffff
je 0x403cb5
cmp dword [ebp - 0x818], 8
lea ecx, [ebp - 0x82c]
cmovae ecx, dword [ebp - 0x82c]
movzx eax, word [ecx + esi*2]
sub eax, 0x23
je 0x403c2c
push 0x18
pop ecx
sub eax, ecx
je 0x403c2c
push 2
pop ecx
sub eax, ecx
je 0x403af9
sub eax, 0x1e
jne 0x403cb8
mov ecx, 0x583218
call fcn.00401581
push eax
push 0xffffffffffffffff
push 0x583218
lea ecx, [ebp - 0x82c]
call fcn.00408d7f
cmp eax, 0xffffffff
je 0x403cb5
cmp eax, esi
jbe 0x403cb5
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.0040771a
push eax
lea ecx, [ebp - 0x8a4]
call fcn.00407694
push 0
push ebx
lea ecx, [ebp - 0x8bc]
call fcn.00401d04
lea eax, [ebp - 0x8a4]
mov ecx, edi
push eax
call fcn.00404584
jmp 0x403cb5
push esi
push 0
lea eax, [ebp - 0x8d4]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040771a
push eax
lea ecx, [ebp - 0x88c]
call fcn.00407694
push 0
push ebx
lea ecx, [ebp - 0x8d4]
call fcn.00401d04
push 0xffffffffffffffff
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x8ec]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040771a
push eax
lea ecx, [ebp - 0x874]
call fcn.00407694
push 0
push ebx
lea ecx, [ebp - 0x8ec]
call fcn.00401d04
cmp dword [ebp - 0x87c], 0
je 0x403bb2
push 0x20
lea ecx, [ebp - 0x88c]
call fcn.004048d8
cmp dword [ebp - 0x87c], 0
je 0x403bb2
push 0x20
lea ecx, [ebp - 0x88c]
call fcn.00404911
cmp dword [ebp - 0x87c], 0
je 0x403bb2
push 9
lea ecx, [ebp - 0x88c]
call fcn.004048d8
cmp dword [ebp - 0x87c], 0
je 0x403bb2
push 9
lea ecx, [ebp - 0x88c]
call fcn.00404911
cmp dword [ebp - 0x864], 0
je 0x403c0a
push 0x20
lea ecx, [ebp - 0x874]
call fcn.004048d8
cmp dword [ebp - 0x864], 0
je 0x403c0a
push 0x20
lea ecx, [ebp - 0x874]
call fcn.00404911
cmp dword [ebp - 0x864], 0
je 0x403c0a
push 9
lea ecx, [ebp - 0x874]
call fcn.004048d8
cmp dword [ebp - 0x864], 0
je 0x403c0a
push 9
lea ecx, [ebp - 0x874]
call fcn.00404911
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.004047d3
jmp 0x403cb5
cmp dword [edi + 0x3c], 0
lea eax, [esi + 1]
push 0xffffffffffffffff
lea ecx, [ebp - 0x82c]
push eax
jne 0x403c6c
lea eax, [ebp - 0x91c]
push eax
call fcn.0040771a
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.00407752
lea ecx, [ebp - 0x91c]
jmp 0x403ca9
lea eax, [ebp - 0x904]
push eax
call fcn.0040771a
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.004044db
mov eax, dword [eax]
cmp eax, dword [edi + 0x38]
je 0x403ca3
lea ecx, [eax + 0x30]
push esi
call fcn.00407820
lea ecx, [ebp - 0x904]
push 0
push ebx
mov byte [ebp - 4], 7
call fcn.00401d04
push 2
pop ecx
mov eax, dword [edi + 0x4c]
test eax, eax
jne 0x403d62
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a050
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.0055fe67
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.00401581
push eax
push edi
lea ecx, [ebp - 0x82c]
call fcn.00401fa1
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
pop ecx
jmp 0x403e6c
cmp eax, ebx
jne 0x403db1
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.0040c164
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 0x40395d
cmp eax, ecx
jne 0x403e72
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a050
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.0055fe67
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.00401581
push eax
push edi
lea ecx, [ebp - 0x844]
call fcn.00401fa1
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.00401f12
mov edi, dword [ebp - 0x92c]
cmp byte [ebp - 0x924], 0
jne 0x403978
cmp dword [edi + 0x4c], 0
jne 0x403e90
lea ecx, [ebp - 0x9f4]
call fcn.00407b91
cmp dword [edi + 0x3c], 0
mov byte [ebp - 0x91d], bl
jne 0x403ea3
mov byte [ebp - 0x91d], 0
push 0
push ebx
lea ecx, [ebp - 0x874]
call fcn.00401d04
push 0
push ebx
lea ecx, [ebp - 0x88c]
call fcn.00401d04
push 0
push ebx
lea ecx, [ebp - 0x8a4]
call fcn.00401d04
push 0
push ebx
lea ecx, [ebp - 0x82c]
call fcn.00401d04
push 0
push ebx
lea ecx, [ebp - 0x844]
call fcn.00401d04
push 0
push ebx
lea ecx, [ebp - 0x85c]
call fcn.00401cbf
lea ecx, [ebp - 0xa3c]
call fcn.0040831b
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.00407b26
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.0056355e
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 0x403e9c
lea ecx, [ebp - 0x9f4]
call fcn.00407b91
jmp 0x403e9c