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

Disassembly:
push 0x238
mov eax, 0x4656d4
call fcn.00461b38
mov edi, ecx
mov dword [ebp - 0xcc], edi
lea esi, [edi + 8]
cmp dword [esi + 0x14], 8
jb 0x41a834
mov eax, dword [esi]
jmp 0x41a836
mov eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x41a877
add edi, 0x20
cmp dword [edi + 0x14], 8
jb 0x41a851
mov eax, dword [edi]
jmp 0x41a853
mov eax, edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x41a877
cmp dword [esi + 0x14], 8
jb 0x41a865
mov eax, dword [esi]
jmp 0x41a867
mov eax, esi
cmp dword [edi + 0x14], 8
jb 0x41a86f
mov edi, dword [edi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp dword [esi + 0x14], 8
jb 0x41a881
mov eax, dword [esi]
jmp 0x41a883
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, esi
call fcn.0041a632
mov edi, eax
push ecx
lea ecx, [ebp - 0x194]
mov dword [ebp - 0xc8], edi
call fcn.0041fd7e
push ecx
push ecx
xor ebx, ebx
lea ecx, [ebp - 0x244]
mov dword [ebp - 4], ebx
call fcn.0041f6da
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], ebx
mov byte [ebp - 0x5c], bl
push 7
pop ecx
xor eax, eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], ebx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xac], ebx
mov word [ebp - 0xbc], ax
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0x94], ebx
mov word [ebp - 0xa4], ax
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x7c], ebx
mov word [ebp - 0x8c], ax
mov byte [ebp - 4], cl
push 2
pop eax
test edi, edi
jne 0x41a9de
cmp dword [esi + 0x14], 8
jb 0x41a92b
mov esi, dword [esi]
push ecx
xor ebx, ebx
lea ecx, [ebp - 0x194]
inc ebx
push ebx
push esi
call fcn.00420969
mov eax, dword [ebp - 0x194]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x188], 6
jne 0x41b0c0
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00420fda
mov esi, dword [ebp - 0x4c]
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 dword [ebp - 0xc0], eax
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004609dc
pop ecx
lea ecx, [esi + esi]
mov edi, eax
push ecx
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x5c]
cmp dword [ebp - 0x48], 0x10
cmovae ecx, dword [ebp - 0x5c]
push esi
push edi
push dword [ebp - 0x4c]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, edi
call fcn.00405fe7
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00406219
push edi
call fcn.004609e5
pop ecx
xor edi, edi
jmp 0x41ac23
xor ebx, ebx
inc ebx
cmp edi, ebx
jne 0x41ab20
cmp dword [esi + 0x14], 8
jb 0x41a9f1
mov esi, dword [esi]
xor edi, edi
push edi
push 0x80
push 3
push edi
push ecx
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc0], eax
cmp eax, 0xffffffff
je 0x41b0c0
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0xd4], edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x41aa8d
lea ecx, [esi + 2]
push ecx
call fcn.004609dc
mov edi, eax
xor eax, eax
pop ecx
push eax
mov word [edi + esi], ax
mov dword [ebp - 0xd0], eax
lea eax, [ebp - 0xd0]
push eax
push esi
mov esi, dword [ebp - 0xc0]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41aa82
push 0x421184
push ecx
lea edx, [edi + 2]
lea ecx, [ebp - 0x234]
call fcn.004090d3
pop ecx
mov ecx, eax
call dword [sym.imp.MSVCP140.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 edi
call fcn.004609e5
pop ecx
xor edi, edi
jmp 0x41aa93
mov esi, dword [ebp - 0xc0]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x244]
lea ecx, [ebp - 0x244]
push 0xa
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.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 - 0x44]
push eax
lea ecx, [ebp - 0x244]
call fcn.00422799
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 - 0x34], 0
mov byte [ebp - 0xc0], al
je 0x41ac14
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x44]
cmp word [eax], cx
jne 0x41ac14
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.0041f611
jmp 0x41ac14
cmp edi, eax
jne 0x41b09f
cmp dword [esi + 0x14], 8
jb 0x41ab30
mov esi, dword [esi]
push ecx
push ebx
push esi
lea ecx, [ebp - 0x194]
call fcn.00420969
mov eax, dword [ebp - 0x194]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x188], 6
jne 0x41b0c0
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00420fda
mov esi, dword [ebp - 0x4c]
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 - 0xc0], al
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004609dc
pop ecx
lea ecx, [esi + esi]
mov edi, eax
push ecx
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x5c]
cmp dword [ebp - 0x48], 0x10
cmovae ecx, dword [ebp - 0x5c]
push esi
push edi
push dword [ebp - 0x4c]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, edi
call fcn.00405fe7
push eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00406219
cmp dword [ebp - 0x34], 0
je 0x41ac0b
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x44]
cmp word [eax], cx
jne 0x41ac0b
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.0041f611
push edi
call fcn.004609e5
pop ecx
xor edi, edi
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00406333
mov eax, dword [ebp - 0xc0]
test al, al
je 0x41b099
cmp dword [ebp - 0x1c], 0
je 0x41ad51
push 9
lea eax, [ebp - 0x2c]
push eax
call fcn.0041b847
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
cmp ecx, 8
mov esi, dword [ebp - 0x1c]
cmovae eax, edx
cmp word [eax + esi*2 - 2], 0xd
jne 0x41ac8a
lea eax, [esi - 1]
push eax
push edi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041f4b9
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040788e
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061c2
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
cmp dword [ebp - 0x1c], 0
je 0x41ad4b
cmp ecx, 8
lea eax, [ebp - 0x2c]
cmovae eax, edx
movzx eax, word [eax]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswprint]
pop ecx
test eax, eax
je 0x41b068
push ecx
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0041f567
mov esi, eax
cmp esi, 0xffffffff
je 0x41ad4b
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
movzx ecx, word [ecx + esi*2]
sub ecx, 0x23
je 0x41aecb
push 0x18
pop eax
sub ecx, eax
je 0x41aecb
push 2
pop edx
sub ecx, edx
je 0x41adeb
sub ecx, 0x1e
jne 0x41af4b
push ecx
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0041f4ec
cmp eax, 0xffffffff
je 0x41ad4b
cmp eax, esi
jbe 0x41ad4b
sub eax, esi
lea ecx, [ebp - 0x2c]
dec eax
push eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.0041f4b9
push eax
lea ecx, [ebp - 0xbc]
call fcn.0040788e
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061c2
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0xbc]
push eax
call fcn.0041b502
mov eax, dword [ebp - 0xc0]
push 2
pop edx
mov edi, dword [ebp - 0xc8]
test edi, edi
jne 0x41af56
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00420fda
mov esi, dword [ebp - 0x4c]
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 - 0xc0], al
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004609dc
pop ecx
lea ecx, [esi + esi]
mov edi, eax
push ecx
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x5c]
cmp dword [ebp - 0x48], 0x10
cmovae ecx, dword [ebp - 0x5c]
push esi
push edi
push dword [ebp - 0x4c]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, edi
call fcn.00405fe7
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00406219
push edi
call fcn.004609e5
pop ecx
jmp 0x41b051
push esi
push edi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041f4b9
push eax
lea ecx, [ebp - 0xa4]
call fcn.0040788e
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061c2
push 0xffffffffffffffff
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041f4b9
push eax
lea ecx, [ebp - 0x8c]
call fcn.0040788e
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061c2
push 0x20
pop edi
push edi
lea eax, [ebp - 0xa4]
push eax
call fcn.0041b847
push edi
lea eax, [ebp - 0xa4]
push eax
call fcn.0041b888
push 9
pop esi
push esi
lea eax, [ebp - 0xa4]
push eax
call fcn.0041b847
push esi
lea eax, [ebp - 0xa4]
push eax
call fcn.0041b888
push edi
lea eax, [ebp - 0x8c]
push eax
call fcn.0041b847
push edi
lea eax, [ebp - 0x8c]
push eax
call fcn.0041b888
push esi
lea eax, [ebp - 0x8c]
push eax
call fcn.0041b847
push esi
lea eax, [ebp - 0x8c]
push eax
call fcn.0041b888
push ecx
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0xbc]
push eax
call fcn.0041b732
jmp 0x41ad4b
mov edi, dword [ebp - 0xcc]
lea eax, [esi + 1]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x74]
cmp dword [edi + 0x3c], 0
lea ecx, [ebp - 0x2c]
push eax
jne 0x41af19
call fcn.0041f4b9
mov esi, eax
lea ecx, [edi + 0x40]
mov byte [ebp - 4], 8
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
push 0x18
pop edi
cdq
idiv edi
push esi
inc eax
push eax
call fcn.0041f3d1
push 0
push ebx
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 7
call fcn.004061c2
jmp 0x41ad4b
call fcn.0041f4b9
mov esi, eax
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0xd0]
mov ecx, edi
push eax
call fcn.0041b460
mov eax, dword [eax]
cmp eax, dword [edi + 0x38]
je 0x41af05
lea ecx, [eax + 0x30]
push esi
call fcn.0041f354
jmp 0x41af05
mov eax, dword [ebp - 0xc0]
jmp 0x41ad54
cmp edi, ebx
jne 0x41afb2
mov eax, dword [ebp - 0x244]
lea ecx, [ebp - 0x244]
push 0xa
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.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 - 0x44]
push eax
lea ecx, [ebp - 0x244]
call fcn.00422799
pop ecx
push 0xffffffffffffffff
push 0
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax + 0xc]
lea ecx, [ebp - 0x2c]
and al, 6
neg al
sbb al, al
inc al
mov byte [ebp - 0xc0], al
lea eax, [ebp - 0x44]
push eax
call fcn.00406333
jmp 0x41b057
cmp edi, edx
jne 0x41b05d
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00420fda
mov esi, dword [ebp - 0x4c]
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 - 0xc0], al
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004609dc
pop ecx
lea ecx, [esi + esi]
mov edi, eax
push ecx
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x5c]
cmp dword [ebp - 0x48], 0x10
cmovae ecx, dword [ebp - 0x5c]
push esi
push edi
push dword [ebp - 0x4c]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, edi
call fcn.00405fe7
push eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00406219
push edi
call fcn.004609e5
pop ecx
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00406333
mov edi, dword [ebp - 0xc8]
mov eax, dword [ebp - 0xc0]
test al, al
je 0x41b09f
xor edi, edi
jmp 0x41ac31
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
movzx eax, word [eax]
push eax
push str.Failing_on_char__d_n
call fcn.0041a35c
cmp dword [ebp - 0xc8], 0
pop ecx
pop ecx
jne 0x41b0c0
lea ecx, [ebp - 0x194]
call fcn.0041fd2d
jmp 0x41b0c0
mov edi, dword [ebp - 0xc8]
test edi, edi
jne 0x41b0ae
lea ecx, [ebp - 0x194]
call fcn.0041fd2d
mov eax, dword [ebp - 0xcc]
mov byte [ebp - 0xc1], bl
cmp dword [eax + 0x3c], 0
jne 0x41b0c7
mov byte [ebp - 0xc1], 0
push 0
push ebx
lea ecx, [ebp - 0x8c]
call fcn.004061c2
xor esi, esi
lea ecx, [ebp - 0xa4]
push esi
push ebx
call fcn.004061c2
push esi
push ebx
lea ecx, [ebp - 0xbc]
call fcn.004061c2
push esi
push ebx
lea ecx, [ebp - 0x2c]
call fcn.004061c2
push esi
push ebx
lea ecx, [ebp - 0x44]
call fcn.004061c2
push esi
push ebx
lea ecx, [ebp - 0x5c]
call fcn.00401ca4
lea ecx, [ebp - 0x1dc]
call fcn.0041f6aa
lea ecx, [ebp - 0x1dc]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x11c]
call fcn.0041fd4e
lea ecx, [ebp - 0x11c]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov al, byte [ebp - 0xc1]
call fcn.00461ae2
ret 4