Function at 0x40349f
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, 0x552f91
call fcn.0054f7e3
mov edi, ecx
mov dword [ebp - 0x92c], edi
lea esi, [edi + 8]
cmp dword [esi + 0x14], 8
jb 0x4034c3
mov eax, dword [esi]
jmp 0x4034c5
mov eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x40350c
add edi, 0x20
cmp dword [edi + 0x14], 8
jb 0x4034e0
mov eax, dword [edi]
jmp 0x4034e2
mov eax, edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x403506
cmp dword [esi + 0x14], 8
jb 0x4034f4
mov eax, dword [esi]
jmp 0x4034f6
mov eax, esi
cmp dword [edi + 0x14], 8
jb 0x4034fe
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 0x403516
mov eax, dword [esi]
jmp 0x403518
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, esi
call fcn.004032c1
push ecx
lea ecx, [ebp - 0x9f4]
mov dword [edi + 0x4c], eax
call fcn.00407af7
push ecx
push ecx
xor ebx, ebx
lea ecx, [ebp - 0xaa4]
mov dword [ebp - 4], ebx
call fcn.00408358
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 0x4035e8
mov eax, dword [esi]
jmp 0x4035ea
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 0x403675
cmp byte [ebp + 8], 0
mov eax, ebx
push 0x41
pop ecx
cmove eax, ecx
push ecx
push eax
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x9f4]
call fcn.00407bc2
mov eax, dword [ebp - 0x9f4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x9e8], 6
jne 0x403e49
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a079
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 0x403c98
cmp eax, ebx
jne 0x4037d6
cmp dword [esi + 0x14], 8
jb 0x403685
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 7
push bind
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x930], eax
cmp eax, 0xffffffff
je 0x403e49
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 0x403729
lea ecx, [esi + 2]
push ecx
call fcn.0054e5c7
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 0x403721
push 0x40a24e
push ecx
lea edx, [esi + 2]
lea ecx, [ebp - 0xa94]
call fcn.0040a09f
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.0040c168
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 0x40390a
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x844]
cmp word [eax], cx
jne 0x40390a
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.004076ee
jmp 0x40390a
cmp eax, ecx
jne 0x403e2c
cmp byte [ebp + 8], 0
mov eax, ebx
push 0x41
pop ecx
cmove eax, ecx
push ecx
push eax
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x9f4]
call fcn.00407bc2
mov eax, dword [ebp - 0x9f4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x9e8], 6
jne 0x403e49
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a079
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.0054e5c7
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.00401511
push eax
push esi
lea ecx, [ebp - 0x844]
call fcn.00401f42
cmp dword [ebp - 0x834], 0
je 0x403902
cmp dword [ebp - 0x830], 8
lea eax, [ebp - 0x844]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x844]
cmp word [eax], cx
jne 0x403902
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.004076ee
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.00401eb3
jmp 0x403e1f
cmp dword [ebp - 0x81c], 0
je 0x403c62
push 9
lea ecx, [ebp - 0x82c]
call fcn.00404885
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 0x4039a3
lea eax, [esi - 1]
push eax
push 0
lea eax, [ebp - 0x8bc]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040774f
push eax
lea ecx, [ebp - 0x82c]
call fcn.004076c9
push 0
push ebx
lea ecx, [ebp - 0x8bc]
call fcn.00401c9b
mov ecx, dword [ebp - 0x818]
mov edx, dword [ebp - 0x82c]
cmp dword [ebp - 0x81c], 0
je 0x403c62
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 0x403ee0
mov esi, 0x570168
mov ecx, esi
call fcn.00401511
push eax
push 0
push esi
lea ecx, [ebp - 0x82c]
call fcn.00408dc1
mov esi, eax
cmp esi, 0xffffffff
je 0x403c62
cmp dword [ebp - 0x818], 8
lea ecx, [ebp - 0x82c]
cmovae ecx, dword [ebp - 0x82c]
movzx eax, word [ecx + esi*2]
sub eax, 0x23
je 0x403bd9
push 0x18
pop ecx
sub eax, ecx
je 0x403bd9
push 2
pop ecx
sub eax, ecx
je 0x403aa6
sub eax, 0x1e
jne 0x403c65
mov ecx, 0x570174
call fcn.00401511
push eax
push 0xffffffffffffffff
push 0x570174
lea ecx, [ebp - 0x82c]
call fcn.00408e3a
cmp eax, 0xffffffff
je 0x403c62
cmp eax, esi
jbe 0x403c62
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.0040774f
push eax
lea ecx, [ebp - 0x8a4]
call fcn.004076c9
push 0
push ebx
lea ecx, [ebp - 0x8bc]
call fcn.00401c9b
lea eax, [ebp - 0x8a4]
mov ecx, edi
push eax
call fcn.00404531
jmp 0x403c62
push esi
push 0
lea eax, [ebp - 0x8d4]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040774f
push eax
lea ecx, [ebp - 0x88c]
call fcn.004076c9
push 0
push ebx
lea ecx, [ebp - 0x8d4]
call fcn.00401c9b
push 0xffffffffffffffff
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x8ec]
push eax
lea ecx, [ebp - 0x82c]
call fcn.0040774f
push eax
lea ecx, [ebp - 0x874]
call fcn.004076c9
push 0
push ebx
lea ecx, [ebp - 0x8ec]
call fcn.00401c9b
cmp dword [ebp - 0x87c], 0
je 0x403b5f
push 0x20
lea ecx, [ebp - 0x88c]
call fcn.00404885
cmp dword [ebp - 0x87c], 0
je 0x403b5f
push 0x20
lea ecx, [ebp - 0x88c]
call fcn.004048be
cmp dword [ebp - 0x87c], 0
je 0x403b5f
push 9
lea ecx, [ebp - 0x88c]
call fcn.00404885
cmp dword [ebp - 0x87c], 0
je 0x403b5f
push 9
lea ecx, [ebp - 0x88c]
call fcn.004048be
cmp dword [ebp - 0x864], 0
je 0x403bb7
push 0x20
lea ecx, [ebp - 0x874]
call fcn.00404885
cmp dword [ebp - 0x864], 0
je 0x403bb7
push 0x20
lea ecx, [ebp - 0x874]
call fcn.004048be
cmp dword [ebp - 0x864], 0
je 0x403bb7
push 9
lea ecx, [ebp - 0x874]
call fcn.00404885
cmp dword [ebp - 0x864], 0
je 0x403bb7
push 9
lea ecx, [ebp - 0x874]
call fcn.004048be
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.00404780
jmp 0x403c62
cmp dword [edi + 0x3c], 0
lea eax, [esi + 1]
push 0xffffffffffffffff
lea ecx, [ebp - 0x82c]
push eax
jne 0x403c19
lea eax, [ebp - 0x91c]
push eax
call fcn.0040774f
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.00407787
lea ecx, [ebp - 0x91c]
jmp 0x403c56
lea eax, [ebp - 0x904]
push eax
call fcn.0040774f
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.00404488
mov eax, dword [eax]
cmp eax, dword [edi + 0x38]
je 0x403c50
lea ecx, [eax + 0x30]
push esi
call fcn.00407855
lea ecx, [ebp - 0x904]
push 0
push ebx
mov byte [ebp - 4], 7
call fcn.00401c9b
push 2
pop ecx
mov eax, dword [edi + 0x4c]
test eax, eax
jne 0x403d0f
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a079
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.0054e5c7
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.00401511
push eax
push edi
lea ecx, [ebp - 0x82c]
call fcn.00401f42
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
pop ecx
jmp 0x403e19
cmp eax, ebx
jne 0x403d5e
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.0040c168
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 0x40390a
cmp eax, ecx
jne 0x403e1f
lea edx, [ebp - 0x85c]
lea ecx, [ebp - 0x9f4]
call fcn.0040a079
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.0054e5c7
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.00401511
push eax
push edi
lea ecx, [ebp - 0x844]
call fcn.00401f42
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.00401eb3
mov edi, dword [ebp - 0x92c]
cmp byte [ebp - 0x924], 0
jne 0x403925
cmp dword [edi + 0x4c], 0
jne 0x403e3d
lea ecx, [ebp - 0x9f4]
call fcn.00407c4c
cmp dword [edi + 0x3c], 0
mov byte [ebp - 0x91d], bl
jne 0x403e50
mov byte [ebp - 0x91d], 0
push 0
push ebx
lea ecx, [ebp - 0x874]
call fcn.00401c9b
push 0
push ebx
lea ecx, [ebp - 0x88c]
call fcn.00401c9b
push 0
push ebx
lea ecx, [ebp - 0x8a4]
call fcn.00401c9b
push 0
push ebx
lea ecx, [ebp - 0x82c]
call fcn.00401c9b
push 0
push ebx
lea ecx, [ebp - 0x844]
call fcn.00401c9b
push 0
push ebx
lea ecx, [ebp - 0x85c]
call fcn.00401c56
lea ecx, [ebp - 0xa3c]
call fcn.004083d6
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.00407b92
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.0054f792
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 0x403e49
lea ecx, [ebp - 0x9f4]
call fcn.00407c4c
jmp 0x403e49