Function at 0x405490
Capabilities:
Copy file
Get file attributes
Get file size
Manipulate boot configuration
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x431f01
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x260
mov eax, dword [0x442184]
push ebx
push esi
push edi
push 1
mov dword [esp + 0x268], eax
call fcn.0042751b
xor eax, eax
mov byte [esp + 0x50], 0
mov ecx, 0x40
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [esp + 0x158], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x159]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.boot.ini
lea ecx, [esp + 0x14]
stosb byte es:[edi], al
call fcn.004053e0
mov eax, dword [ebp + 8]
lea edx, [esp + 0x50]
mov dword [esp + 0x274], 0
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405520
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x54]
push ecx
mov edx, ecx
push 0x434b64
push edx
call fcn.004170ff
push str..bak
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x170]
push str._s_s
push ecx
call fcn.004170ff
add esp, 0x20
lea ecx, [esp + 0x38]
call fcn.0040efd4
push 0
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x40]
mov byte [esp + 0x27c], 1
call fcn.0040f067
test eax, eax
je 0x4058d6
push 0
lea eax, [esp + 0x15c]
push eax
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, eax
push 0x80
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x2c], edi
call ebx
test eax, eax
je 0x4058d6
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x4058ce
cmp esi, 0xffffffff
je 0x4058ce
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov ebx, eax
lea ecx, [ebx + 0x64]
push ecx
push 0
push 4
push 0
push esi
mov dword [esp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40588c
cmp eax, 0xffffffff
je 0x40588c
push 0
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
mov dword [esp + 0x34], edi
jne 0x405678
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
push 0
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call edi
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
jmp 0x4058ac
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 0
call fcn.00401760
test ebx, ebx
mov byte [esp + 0x274], 2
jbe 0x4056bb
mov edx, dword [esp + 0x18]
mov al, byte [edx + edi]
mov byte [esp + 0x28], al
mov ecx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x18]
call fcn.004046f0
mov eax, dword [esp + 0x18]
inc eax
cmp eax, ebx
mov dword [esp + 0x18], eax
jb 0x405695
lea ecx, [esp + 0x14]
call fcn.00404770
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x4056ea
push str._NOEXECUTE
push eax
call fcn.004172e1
add esp, 8
test eax, eax
je 0x4056ea
sub eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jne 0x40572b
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
push 0
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call edi
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x14]
call fcn.004015e0
jmp 0x4058b2
push eax
push 0x435014
lea ecx, [esp + 0x1c]
call fcn.00401720
cmp eax, 0xffffffff
je 0x4056ea
inc eax
lea ecx, [eax + edi]
mov dword [esp + 0x18], ecx
mov cl, byte [ecx]
cmp cl, 0x20
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0
jne 0x40576b
lea edx, [esp + 0x1c]
push edx
push 1
push edi
push esi
push eax
call fcn.00402ef0
jmp 0x40577a
lea ecx, [esp + 0x1c]
push ecx
push 0
push edi
push esi
push eax
call fcn.00402f90
add esp, 0x14
push str.AlwaysOff
lea ecx, [esp + 0x34]
call fcn.004053e0
mov edx, dword [esp + 0x30]
mov ebx, dword [edx - 0xc]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jge 0x4057d6
mov ecx, dword [esp + 0x28]
mov edx, ecx
sub edx, ebx
add edx, dword [esp + 0x2c]
add eax, ecx
add eax, edi
push edx
push eax
lea eax, [ebx + ecx]
add eax, edi
push eax
call fcn.00417a00
mov edi, dword [esp + 0x24]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 0xc
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x34]
jmp 0x4057f8
mov edx, dword [esp + 0x2c]
mov ecx, ebx
sub ecx, eax
add ecx, edx
push ecx
mov ecx, dword [esp + 0x2c]
add eax, ecx
add eax, edi
lea edx, [ebx + ecx]
push eax
add edx, edi
push edx
call fcn.00417a00
add esp, 0xc
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov eax, dword [esp + 0x18]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov cl, byte [ecx + 8]
push edi
mov byte [eax + 8], cl
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
push 0
sub ebx, eax
push 0
add ebx, edx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call edi
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x30]
call fcn.004015e0
lea ecx, [esp + 0x14]
call fcn.004015e0
lea ecx, [esp + 0x38]
mov byte [esp + 0x274], 0
call fcn.0040eff8
lea ecx, [esp + 0x10]
call fcn.004015e0
mov eax, 1
jmp 0x405912
push 0
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
lea edx, [esp + 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x38]
mov byte [esp + 0x274], 0
call fcn.0040eff8
lea ecx, [esp + 0x10]
call fcn.004015e0
jmp 0x405910
push edi
lea eax, [esp + 0x54]
push eax
call ebx
lea ecx, [esp + 0x38]
mov byte [esp + 0x274], 0
call fcn.0040eff8
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x274], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405910
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
mov ecx, dword [esp + 0x26c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x264]
call fcn.00417188
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4