Function at 0x41d165
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, 0x46af97
call fcn.00466ebb
mov edi, ecx
mov dword [ebp - 0xcc], edi
lea esi, [edi + 8]
cmp dword [esi + 0x14], 8
jb 0x41d189
mov eax, dword [esi]
jmp 0x41d18b
mov eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x41d1cc
add edi, 0x20
cmp dword [edi + 0x14], 8
jb 0x41d1a6
mov eax, dword [edi]
jmp 0x41d1a8
mov eax, edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x41d1cc
cmp dword [esi + 0x14], 8
jb 0x41d1ba
mov eax, dword [esi]
jmp 0x41d1bc
mov eax, esi
cmp dword [edi + 0x14], 8
jb 0x41d1c4
mov edi, dword [edi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
cmp dword [esi + 0x14], 8
jb 0x41d1d6
mov eax, dword [esi]
jmp 0x41d1d8
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, esi
call fcn.0041cf87
mov edi, eax
push ecx
lea ecx, [ebp - 0x194]
mov dword [ebp - 0xc8], edi
call fcn.00422a3b
push ecx
push ecx
xor ebx, ebx
lea ecx, [ebp - 0x244]
mov dword [ebp - 4], ebx
call fcn.00422397
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 0x41d333
cmp dword [esi + 0x14], 8
jb 0x41d280
mov esi, dword [esi]
push ecx
xor ebx, ebx
lea ecx, [ebp - 0x194]
inc ebx
push ebx
push esi
call fcn.004235fd
mov eax, dword [ebp - 0x194]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x188], 6
jne 0x41d9fe
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00423c41
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.00465da0
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.00405fc5
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00406202
push edi
call fcn.00465da9
pop ecx
xor edi, edi
jmp 0x41d578
xor ebx, ebx
inc ebx
cmp edi, ebx
jne 0x41d475
cmp dword [esi + 0x14], 8
jb 0x41d346
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 0x41d9fe
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 0x41d3e2
lea ecx, [esi + 2]
push ecx
call fcn.00465da0
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 0x41d3d7
push 0x423deb
push ecx
lea edx, [edi + 2]
lea ecx, [ebp - 0x234]
call fcn.00409102
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.00465da9
pop ecx
xor edi, edi
jmp 0x41d3e8
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.004256e2
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 0x41d569
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x44]
cmp word [eax], cx
jne 0x41d569
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.004222ce
jmp 0x41d569
cmp edi, eax
jne 0x41d9dd
cmp dword [esi + 0x14], 8
jb 0x41d485
mov esi, dword [esi]
push ecx
push ebx
push esi
lea ecx, [ebp - 0x194]
call fcn.004235fd
mov eax, dword [ebp - 0x194]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x188], 6
jne 0x41d9fe
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00423c41
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.00465da0
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.00405fc5
push eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00406202
cmp dword [ebp - 0x34], 0
je 0x41d560
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
mov ecx, 0xfeff
cmovae eax, dword [ebp - 0x44]
cmp word [eax], cx
jne 0x41d560
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.004222ce
push edi
call fcn.00465da9
pop ecx
xor edi, edi
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040631c
mov eax, dword [ebp - 0xc0]
test al, al
je 0x41d9d7
cmp dword [ebp - 0x1c], 0
je 0x41d6a6
push 9
lea eax, [ebp - 0x2c]
push eax
call fcn.0041e220
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 0x41d5df
lea eax, [esi - 1]
push eax
push edi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00422176
push eax
lea ecx, [ebp - 0x2c]
call fcn.00407877
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061ab
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
cmp dword [ebp - 0x1c], 0
je 0x41d6a0
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 0x41d9a6
push ecx
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00422224
mov esi, eax
cmp esi, 0xffffffff
je 0x41d6a0
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
movzx ecx, word [ecx + esi*2]
sub ecx, 0x23
je 0x41d821
push 0x18
pop eax
sub ecx, eax
je 0x41d821
push 2
pop edx
sub ecx, edx
je 0x41d740
sub ecx, 0x1e
jne 0x41d889
push ecx
push ecx
lea ecx, [ebp - 0x2c]
call fcn.004221a9
cmp eax, 0xffffffff
je 0x41d6a0
cmp eax, esi
jbe 0x41d6a0
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.00422176
push eax
lea ecx, [ebp - 0xbc]
call fcn.00407877
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061ab
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0xbc]
push eax
call fcn.0041de40
mov eax, dword [ebp - 0xc0]
push 2
pop edx
mov edi, dword [ebp - 0xc8]
test edi, edi
jne 0x41d894
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00423c41
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.00465da0
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.00405fc5
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00406202
push edi
call fcn.00465da9
pop ecx
jmp 0x41d98f
push esi
push edi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00422176
push eax
lea ecx, [ebp - 0xa4]
call fcn.00407877
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061ab
push 0xffffffffffffffff
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00422176
push eax
lea ecx, [ebp - 0x8c]
call fcn.00407877
push edi
push ebx
lea ecx, [ebp - 0x74]
call fcn.004061ab
push 0x20
pop esi
push esi
lea eax, [ebp - 0xa4]
push eax
call fcn.0041e220
push esi
lea eax, [ebp - 0xa4]
push eax
call fcn.0041e261
push 9
lea eax, [ebp - 0xa4]
push eax
call fcn.0041e220
push 9
lea eax, [ebp - 0xa4]
push eax
call fcn.0041e261
push esi
lea eax, [ebp - 0x8c]
push eax
call fcn.0041e220
push esi
lea eax, [ebp - 0x8c]
push eax
call fcn.0041e261
push 9
lea eax, [ebp - 0x8c]
push eax
call fcn.0041e220
push 9
lea eax, [ebp - 0x8c]
push eax
call fcn.0041e261
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.0041e070
jmp 0x41d6a0
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 0x41d86f
call fcn.00422176
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.0042208e
push 0
push ebx
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 7
call fcn.004061ab
jmp 0x41d6a0
call fcn.00422176
push eax
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 9
push eax
mov ecx, edi
call fcn.0041e185
jmp 0x41d85b
mov eax, dword [ebp - 0xc0]
jmp 0x41d6a9
cmp edi, ebx
jne 0x41d8f0
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.004256e2
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.0040631c
jmp 0x41d995
cmp edi, edx
jne 0x41d99b
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x194]
call fcn.00423c41
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.00465da0
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.00405fc5
push eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00406202
push edi
call fcn.00465da9
pop ecx
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040631c
mov edi, dword [ebp - 0xc8]
mov eax, dword [ebp - 0xc0]
test al, al
je 0x41d9dd
xor edi, edi
jmp 0x41d586
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.0041cc7a
cmp dword [ebp - 0xc8], 0
pop ecx
pop ecx
jne 0x41d9fe
lea ecx, [ebp - 0x194]
call fcn.004229ea
jmp 0x41d9fe
mov edi, dword [ebp - 0xc8]
test edi, edi
jne 0x41d9ec
lea ecx, [ebp - 0x194]
call fcn.004229ea
mov eax, dword [ebp - 0xcc]
mov byte [ebp - 0xc1], bl
cmp dword [eax + 0x3c], 0
jne 0x41da05
mov byte [ebp - 0xc1], 0
push 0
push ebx
lea ecx, [ebp - 0x8c]
call fcn.004061ab
xor esi, esi
lea ecx, [ebp - 0xa4]
push esi
push ebx
call fcn.004061ab
push esi
push ebx
lea ecx, [ebp - 0xbc]
call fcn.004061ab
push esi
push ebx
lea ecx, [ebp - 0x2c]
call fcn.004061ab
push esi
push ebx
lea ecx, [ebp - 0x44]
call fcn.004061ab
push esi
push ebx
lea ecx, [ebp - 0x5c]
call fcn.00401c5e
lea ecx, [ebp - 0x1dc]
call fcn.00422367
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.00422a0b
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.00466e65
ret 4