Function at 0x422a32
Capabilities:
Read file on windows
Set file attributes

Disassembly:
mov eax, 0x42d17f
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x1ec
push ebx
push esi
push edi
mov esi, ecx
push 5
mov byte [ebp - 0xd], 1
call sub.MFC42.DLL_operatornew
pop ecx
mov edi, 0x104
push edi
mov dword [ebp - 0x24], eax
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x48], eax
push 0xf
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x18], eax
push edi
call sub.MFC42.DLL_operatornew
mov edi, dword [sym.imp.MSVCRT.dll__ftime]
mov dword [ebp - 0x44], eax
pop ecx
lea eax, [ebp - 0x40]
push eax
call edi
movzx eax, word [ebp - 0x3c]
mov dword [ebp - 0x14], eax
pop ecx
fild dword [ebp - 0x14]
push 4
push dword [ebp - 0x24]
fstp qword [ebp - 0x20]
fld qword [ebp - 0x20]
fmul qword [0x431958]
fild dword [ebp - 0x40]
push dword [esi + 0x17c]
fstp qword [ebp - 0x20]
fadd qword [ebp - 0x20]
fstp qword [esi + 0x160]
call dword [sym.imp.MSVCRT.dll__read]
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
test eax, eax
mov dword [esi + 0x178], eax
jg 0x422aee
push 0x43fee0
push 0x43fef0
push str._s:_ERROR_READING__s
push dword [esi + 0x18c]
call ebx
add esp, 0x10
and byte [ebp - 0xd], 0
fld qword [esi + 0x160]
lea eax, [ebp - 0x34]
fstp qword [ebp - 0x3c]
push eax
call edi
movzx eax, word [ebp - 0x30]
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0xd], 0
fild dword [ebp - 0x14]
pop ecx
fstp qword [ebp - 0x20]
fld qword [ebp - 0x20]
fmul qword [0x431958]
fild dword [ebp - 0x34]
fstp qword [ebp - 0x20]
fadd qword [ebp - 0x20]
fsub qword [ebp - 0x3c]
fadd qword [esi + 0xe0]
fstp qword [esi + 0xe0]
je 0x422c5a
mov eax, dword [ebp - 0x24]
and byte [eax + 4], 0
push dword [esi + 0x178]
mov ecx, dword [esi + 0x1a0]
push eax
push 1
call fcn.0040c4ee
test al, al
mov byte [ebp - 0xd], al
je 0x422b6a
push dword [ebp - 0x24]
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
mov dword [esi + 0x170], eax
jmp 0x422b84
push 0x43fefc
push 0x43ff0c
push str._s_FILE_CONVERSION_ERROR__FIELD___s
push dword [esi + 0x18c]
call ebx
add esp, 0x10
cmp byte [ebp - 0xd], 0
je 0x422c5a
lea eax, [ebp - 0x34]
push eax
call edi
movzx eax, word [ebp - 0x30]
mov dword [ebp - 0x14], eax
pop ecx
fild dword [ebp - 0x14]
push dword [esi + 0x170]
fstp qword [ebp - 0x3c]
fld qword [ebp - 0x3c]
fmul qword [0x431958]
fild dword [ebp - 0x34]
push dword [esi + 0xc0]
fstp qword [ebp - 0x3c]
push dword [esi + 0x17c]
fadd qword [ebp - 0x3c]
fstp qword [esi + 0x160]
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
mov dword [esi + 0x178], eax
test eax, eax
jle 0x422c2f
fld qword [esi + 0x160]
lea eax, [ebp - 0x34]
fstp qword [ebp - 0x20]
push eax
call edi
movzx eax, word [ebp - 0x30]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc0]
fild dword [ebp - 0x14]
pop ecx
mov ecx, dword [esi + 0x170]
fstp qword [ebp - 0x3c]
fld qword [ebp - 0x3c]
fmul qword [0x431958]
fild dword [ebp - 0x34]
fstp qword [ebp - 0x3c]
fadd qword [ebp - 0x3c]
fsub qword [ebp - 0x20]
fadd qword [esi + 0xe0]
fstp qword [esi + 0xe0]
and byte [eax + ecx], 0
jmp 0x422c4d
push 0x43ff18
push 0x43ff28
push str._s:_ERROR_READING__s
push dword [esi + 0x18c]
call ebx
add esp, 0x10
and byte [ebp - 0xd], 0
cmp byte [ebp - 0xd], 0
je 0x422c5a
mov ecx, esi
call fcn.00423a9a
push 1
lea ecx, [ebp - 0x1f8]
call fcn.0040b2f6
push dword [esi + 0x170]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x1f8]
push dword [esi + 0x198]
call fcn.0040c2df
mov al, byte [0x442460]
lea edi, [ebp - 0x33]
mov byte [ebp - 0x34], al
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov al, byte [esi + 0xc5]
cmp al, 0x32
jl 0x422cbc
movsx eax, al
push eax
movsx eax, byte [esi + 0xc4]
push eax
lea eax, [ebp - 0x34]
push 0x43ff34
push eax
call ebx
add esp, 0x10
and byte [ebp - 0x28], 0
jmp 0x422cd2
movsx eax, byte [esi + 0xc4]
push eax
lea eax, [ebp - 0x34]
push str.ECM_02d.MAP
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x34]
push 0xc
push eax
mov eax, dword [esi + 0x198]
add eax, 0x39
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea ecx, [ebp - 0x1f8]
push dword [esi + 0x170]
push dword [esi + 0x198]
call fcn.0040c2b7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x98]
call fcn.0040b493
lea ecx, [ebp - 0x98]
call dword [sym.imp.MSVCIRT.dll_public_virtual:_void___thiscall_ios::destructor_void_]
mov eax, dword [esi + 0x174]
sub eax, 0xe
je 0x422d55
dec eax
je 0x422d41
dec eax
jne 0x422d6f
mov eax, dword [esi + 0x194]
push 0x42
lea ecx, [eax + 8]
push ecx
push eax
push 0x43ff70
jmp 0x422d67
mov eax, dword [esi + 0x194]
push 0x41
lea ecx, [eax + 8]
push ecx
push eax
push 0x43ff60
jmp 0x422d67
mov eax, dword [esi + 0x194]
push 0x4d
lea ecx, [eax + 8]
push ecx
push eax
push 0x43ff50
push dword [ebp - 0x18]
call ebx
add esp, 0x14
lea eax, [ebp - 0x1c]
mov ecx, 0x441ef8
push eax
call fcn.00419ca2
push 0x40
push 0x43ff80
push dword [eax]
mov dword [ebp - 4], 1
call dword [sym.imp.MSVCRT.dll__fsopen]
mov edi, eax
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x1c]
test edi, edi
setne al
or dword [ebp - 4], 0xffffffff
mov byte [ebp - 0xd], al
call sub.MFC42.DLL_CString::CString
cmp byte [ebp - 0xd], 0
je 0x422dce
push dword [ebp - 0x18]
push 0x43ff84
push edi
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
push dword [ebp - 0x18]
mov ecx, dword [esi + 0x19c]
call fcn.0040ad5d
test al, al
je 0x422e2c
push 0x12c
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
mov dword [ebp - 4], 2
je 0x422e04
mov ecx, eax
call fcn.00405203
mov edi, eax
jmp 0x422e06
xor edi, edi
or dword [ebp - 4], 0xffffffff
test edi, edi
je 0x422e2c
push dword [ebp - 0x44]
mov ecx, edi
push 0x56
call fcn.00405302
test edi, edi
je 0x422e2c
mov ecx, edi
call fcn.004052b5
push edi
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 0x18]
mov edi, dword [ebp - 0x48]
push dword [ebp - 0x44]
push 0x43ff88
push edi
call ebx
add esp, 0x10
push 0
push edi
call dword [sym.imp.MSVCRT.dll__access]
pop ecx
pop ecx
test eax, eax
push 0x80
jne 0x422e5b
push 0x8202
jmp 0x422e60
push 0x8102
push edi
call dword [sym.imp.MSVCRT.dll__open]
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x422ebe
push dword [esi + 0x170]
push dword [esi + 0x198]
push eax
call dword [sym.imp.MSVCRT.dll__write]
add esp, 0xc
cmp eax, 0xffffffff
je 0x422e91
mov bl, 1
jmp 0x422ea9
push edi
push 0x43ff90
push str._s:_ERROR_WRITING__s
push dword [esi + 0x18c]
call ebx
add esp, 0x10
xor bl, bl
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll__close]
pop ecx
push 2
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x422ed6
push edi
push 0x43ff9c
push 0x4318c0
push dword [esi + 0x18c]
call ebx
add esp, 0x10
xor bl, bl
push dword [ebp - 0x18]
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 0x44]
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 0x24]
call sub.MFC42.DLL_operatordelete
pop ecx
push edi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esi + 0x198]
pop ecx
test eax, eax
je 0x422f10
push eax
call sub.MFC42.DLL_operatordelete
and dword [esi + 0x198], 0
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret