Function at 0x10012060
Capabilities:
Get file attributes
Manipulate boot configuration
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10035f24
mov eax, dword fs:[0]
push eax
sub esp, 0x52c
mov eax, dword [0x1004c024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x514], ecx
cmp dword [ebp + 8], 5
jle 0x100129d2
mov dword [ebp - 0x174], 0
mov dword [ebp - 0x170], 0
push 0x80000
call fcn.1000f6bd
add esp, 4
mov dword [ebp - 0x4bc], eax
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x388], eax
push 0x80000
push 0
mov ecx, dword [ebp - 0x388]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x128]
call fcn.1002fcd0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x394]
push edx
lea eax, [ebp - 0x380]
push eax
lea ecx, [ebp - 0x128]
call fcn.1002fbe0
test eax, eax
jne 0x1001218f
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x518], eax
push 0x43c
push 0x1003a040
call fcn.10010f00
add esp, 8
push eax
push str._s:_Create_read_pipe_failed.
mov ecx, dword [ebp - 0x518]
push ecx
mov edx, dword [ebp - 0x518]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x388]
mov dword [ebp - 0x4c0], edx
mov eax, dword [ebp - 0x4c0]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4c4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4c4]
jmp 0x10012c63
lea ecx, [ebp - 0x38c]
push ecx
lea edx, [ebp - 0x384]
push edx
lea ecx, [ebp - 0x128]
call fcn.1002fb50
test eax, eax
jne 0x10012246
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x51c], eax
push 0x442
push 0x1003a070
call fcn.10010f00
add esp, 8
push eax
push str._s:_Create_write_pipe_failed.
mov eax, dword [ebp - 0x51c]
push eax
mov ecx, dword [ebp - 0x51c]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
push 0
push 0
mov ecx, dword [ebp - 0x394]
push ecx
mov edx, dword [ebp - 0x380]
push edx
call fcn.10010ed0
add esp, 0x10
mov eax, dword [ebp - 0x388]
mov dword [ebp - 0x4c8], eax
mov ecx, dword [ebp - 0x4c8]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4cc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4cc]
jmp 0x10012c63
mov edx, dword [ebp - 0x38c]
push edx
mov eax, dword [ebp - 0x394]
push eax
lea ecx, [ebp - 0x128]
call fcn.1002f8a0
test eax, eax
jne 0x10012307
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x520], eax
push 0x449
push 0x1003a0a0
call fcn.10010f00
add esp, 8
push eax
push str._s:_Create_process_failed.
mov ecx, dword [ebp - 0x520]
push ecx
mov edx, dword [ebp - 0x520]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x394]
push edx
mov eax, dword [ebp - 0x380]
push eax
mov ecx, dword [ebp - 0x38c]
push ecx
mov edx, dword [ebp - 0x384]
push edx
call fcn.10010ed0
add esp, 0x10
mov eax, dword [ebp - 0x388]
mov dword [ebp - 0x4d0], eax
mov ecx, dword [ebp - 0x4d0]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4d4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4d4]
jmp 0x10012c63
mov byte [ebp - 0x11c], 0
push 0x103
push 0
lea edx, [ebp - 0x11b]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
call fcn.10011180
add esp, 4
test eax, eax
jne 0x10012382
cmp dword [ebp - 0x388], 0
je 0x1001235b
mov ecx, dword [ebp - 0x388]
mov dword [ebp - 0x4d8], ecx
mov edx, dword [ebp - 0x4d8]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4dc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4dc]
jmp 0x10012c63
mov byte [ebp - 0x37c], 0
push 0x1ff
push 0
lea eax, [ebp - 0x37b]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x11c]
push ecx
push str._s_bcdedit.exe__enum__v_n
lea edx, [ebp - 0x37c]
push edx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x37c]
push eax
call sub.ntdll.dll_strlen
add esp, 4
push eax
lea ecx, [ebp - 0x37c]
push ecx
mov edx, dword [ebp - 0x384]
push edx
lea ecx, [ebp - 0x128]
call fcn.1002fb00
test eax, eax
jne 0x1001248c
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x524], eax
push 0x45b
push 0x1003a0e8
call fcn.10010f00
add esp, 8
push eax
push 0x1003a0f8
mov eax, dword [ebp - 0x524]
push eax
mov ecx, dword [ebp - 0x524]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
mov ecx, dword [ebp - 0x394]
push ecx
mov edx, dword [ebp - 0x380]
push edx
mov eax, dword [ebp - 0x38c]
push eax
mov ecx, dword [ebp - 0x384]
push ecx
call fcn.10010ed0
add esp, 0x10
mov edx, dword [ebp - 0x388]
mov dword [ebp - 0x4e0], edx
mov eax, dword [ebp - 0x4e0]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4e4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4e4]
jmp 0x10012c63
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x174]
push ecx
mov edx, dword [ebp - 0x388]
push edx
mov eax, dword [ebp - 0x380]
push eax
lea ecx, [ebp - 0x128]
call fcn.1002f9c0
test eax, eax
jne 0x1001255f
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x528], eax
push 0x463
push 0x1003a114
call fcn.10010f00
add esp, 8
push eax
push 0x1003a124
mov ecx, dword [ebp - 0x528]
push ecx
mov edx, dword [ebp - 0x528]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x394]
push edx
mov eax, dword [ebp - 0x380]
push eax
mov ecx, dword [ebp - 0x38c]
push ecx
mov edx, dword [ebp - 0x384]
push edx
call fcn.10010ed0
add esp, 0x10
mov eax, dword [ebp - 0x388]
mov dword [ebp - 0x4e8], eax
mov ecx, dword [ebp - 0x4e8]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4ec], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4ec]
jmp 0x10012c63
mov byte [ebp - 0x16c], 0
push 0x3f
push 0
lea edx, [ebp - 0x16b]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
push 0x1003a140
call sub.ntdll.dll_strlen
add esp, 4
mov dword [ebp - 0x178], eax
mov dword [ebp - 0x12c], 0
lea eax, [ebp - 0x16c]
mov dword [ebp - 0x390], eax
mov dword [ebp - 0x398], 0
jmp 0x100125bd
mov ecx, dword [ebp - 0x398]
add ecx, 1
mov dword [ebp - 0x398], ecx
mov edx, dword [ebp - 0x174]
sub edx, dword [ebp - 0x178]
cmp dword [ebp - 0x398], edx
jge 0x100126aa
mov eax, dword [ebp - 0x388]
add eax, dword [ebp - 0x398]
movsx ecx, byte [eax]
cmp ecx, 0x7b
jne 0x100125fb
mov edx, dword [ebp - 0x388]
add edx, dword [ebp - 0x398]
mov dword [ebp - 0x12c], edx
mov eax, dword [ebp - 0x178]
push eax
push 0x1003a14c
mov ecx, dword [ebp - 0x388]
add ecx, dword [ebp - 0x398]
push ecx
call dword [sym.imp.ntdll.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x100126a5
cmp dword [ebp - 0x12c], 0
je 0x100126a5
mov edx, dword [ebp - 0x12c]
movsx eax, byte [edx]
cmp eax, 0x7d
je 0x1001266c
mov ecx, dword [ebp - 0x390]
mov edx, dword [ebp - 0x12c]
mov al, byte [edx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x390]
add ecx, 1
mov dword [ebp - 0x390], ecx
mov edx, dword [ebp - 0x12c]
add edx, 1
mov dword [ebp - 0x12c], edx
jmp 0x1001262e
mov eax, dword [ebp - 0x390]
mov ecx, dword [ebp - 0x12c]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x390]
add eax, 1
mov dword [ebp - 0x390], eax
mov ecx, dword [ebp - 0x390]
mov byte [ecx], 0
mov edx, dword [ebp - 0x390]
add edx, 1
mov dword [ebp - 0x390], edx
jmp 0x100126aa
jmp 0x100125ae
lea eax, [ebp - 0x16c]
push eax
call sub.ntdll.dll_strlen
add esp, 4
test eax, eax
jne 0x10012739
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x52c], eax
push 0x47e
push 0x1003a158
call fcn.10010f00
add esp, 8
push eax
push str._s:_Failed_to_get_our_option.
mov ecx, dword [ebp - 0x52c]
push ecx
mov edx, dword [ebp - 0x52c]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x388]
mov dword [ebp - 0x4f0], edx
mov eax, dword [ebp - 0x4f0]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4f4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4f4]
jmp 0x10012c63
push 0x200
push 0
lea ecx, [ebp - 0x37c]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
lea edx, [ebp - 0x16c]
push edx
lea eax, [ebp - 0x11c]
push eax
push str._s_bcdedit.exe__delete__s__f_n
lea ecx, [ebp - 0x37c]
push ecx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x10
lea edx, [ebp - 0x37c]
push edx
call sub.ntdll.dll_strlen
add esp, 4
push eax
lea eax, [ebp - 0x37c]
push eax
mov ecx, dword [ebp - 0x384]
push ecx
lea ecx, [ebp - 0x128]
call fcn.1002fb00
test eax, eax
jne 0x10012843
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x530], eax
push 0x487
push 0x1003a1a8
call fcn.10010f00
add esp, 8
push eax
push str._s:_write_to_pipe_failed.
mov edx, dword [ebp - 0x530]
push edx
mov eax, dword [ebp - 0x530]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
mov eax, dword [ebp - 0x394]
push eax
mov ecx, dword [ebp - 0x380]
push ecx
mov edx, dword [ebp - 0x38c]
push edx
mov eax, dword [ebp - 0x384]
push eax
call fcn.10010ed0
add esp, 0x10
mov ecx, dword [ebp - 0x388]
mov dword [ebp - 0x4f8], ecx
mov edx, dword [ebp - 0x4f8]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x4fc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x4fc]
jmp 0x10012c63
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x174], 0
push 0x1000
push 0
mov eax, dword [ebp - 0x388]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x174]
push ecx
mov edx, dword [ebp - 0x388]
push edx
mov eax, dword [ebp - 0x380]
push eax
lea ecx, [ebp - 0x128]
call fcn.1002f9c0
test eax, eax
jne 0x10012936
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x534], eax
push 0x491
push 0x1003a1d4
call fcn.10010f00
add esp, 8
push eax
push str._s:_Read_from_pipe_failed.
mov ecx, dword [ebp - 0x534]
push ecx
mov edx, dword [ebp - 0x534]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x394]
push edx
mov eax, dword [ebp - 0x380]
push eax
mov ecx, dword [ebp - 0x38c]
push ecx
mov edx, dword [ebp - 0x384]
push edx
call fcn.10010ed0
add esp, 0x10
mov eax, dword [ebp - 0x388]
mov dword [ebp - 0x500], eax
mov ecx, dword [ebp - 0x500]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [ebp - 0x504], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x504]
jmp 0x10012c63
mov edx, dword [ebp - 0x394]
push edx
mov eax, dword [ebp - 0x380]
push eax
mov ecx, dword [ebp - 0x38c]
push ecx
mov edx, dword [ebp - 0x384]
push edx
call fcn.10010ed0
add esp, 0x10
mov eax, dword [ebp - 0x388]
mov dword [ebp - 0x508], eax
mov ecx, dword [ebp - 0x508]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x514]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x514]
mov eax, dword [edx + 0xc]
call eax
test eax, eax
jne 0x100129bb
mov dword [ebp - 0x50c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
mov eax, dword [ebp - 0x50c]
jmp 0x10012c63
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002fc70
jmp 0x10012c61
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x514]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x514]
mov eax, dword [edx + 0xc]
call eax
test eax, eax
jne 0x100129fb
mov eax, 1
jmp 0x10012c63
push 0x1003a200
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR80.dll_fopen]
add esp, 8
mov dword [ebp - 0x3a0], eax
cmp dword [ebp - 0x3a0], 0
jne 0x10012a23
xor eax, eax
jmp 0x10012c63
push 0x1003a204
call sub.ntdll.dll_strlen
add esp, 4
mov dword [ebp - 0x3a4], eax
push 0x1000
call fcn.1000f6bd
add esp, 4
mov dword [ebp - 0x510], eax
mov edx, dword [ebp - 0x510]
mov dword [ebp - 0x39c], edx
push 0x100
push 0
lea eax, [ebp - 0x4ac]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x1000
push 0
mov ecx, dword [ebp - 0x39c]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
mov edx, dword [ebp - 0x3a0]
push edx
call dword [sym.imp.MSVCR80.dll_feof]
add esp, 4
test eax, eax
jne 0x10012b6b
mov eax, dword [ebp - 0x3a0]
push eax
push 0x100
lea ecx, [ebp - 0x4ac]
push ecx
call dword [sym.imp.MSVCR80.dll_fgets]
add esp, 0xc
lea edx, [ebp - 0x4ac]
push edx
call sub.ntdll.dll_strlen
add esp, 4
mov dword [ebp - 0x4b4], eax
mov dword [ebp - 0x4b8], 0
jmp 0x10012ae5
mov eax, dword [ebp - 0x4b8]
add eax, 1
mov dword [ebp - 0x4b8], eax
mov ecx, dword [ebp - 0x4b4]
sub ecx, dword [ebp - 0x3a4]
cmp dword [ebp - 0x4b8], ecx
jge 0x10012b3a
mov edx, dword [ebp - 0x3a4]
push edx
push 0x1003a214
mov eax, dword [ebp - 0x4b8]
lea ecx, [ebp + eax - 0x4ac]
push ecx
call dword [sym.imp.ntdll.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x10012b38
push 0x100
push 0
lea edx, [ebp - 0x4ac]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
jmp 0x10012b3a
jmp 0x10012ad6
lea eax, [ebp - 0x4ac]
push eax
mov ecx, dword [ebp - 0x39c]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
push 0x100
push 0
lea edx, [ebp - 0x4ac]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
jmp 0x10012a81
mov eax, dword [ebp - 0x3a0]
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x4b0], eax
push 0x80
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x1003a224
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR80.dll_fopen]
add esp, 8
mov dword [ebp - 0x3a0], eax
cmp dword [ebp - 0x3a0], 0
jne 0x10012bc2
xor eax, eax
jmp 0x10012c63
mov ecx, dword [ebp - 0x39c]
push ecx
call sub.ntdll.dll_strlen
add esp, 4
mov dword [ebp - 0x3a8], eax
mov edx, dword [ebp - 0x3a0]
push edx
mov eax, dword [ebp - 0x3a8]
push eax
push 1
mov ecx, dword [ebp - 0x39c]
push ecx
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
cmp eax, dword [ebp - 0x3a8]
je 0x10012c39
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x538], eax
push 0x4d5
push 0x1003a228
call fcn.10010f00
add esp, 8
push eax
push str._s:_Warning:_write_boot.ini
mov edx, dword [ebp - 0x538]
push edx
mov eax, dword [ebp - 0x538]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
mov eax, dword [ebp - 0x3a0]
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 0x4b0]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, 1
jmp 0x10012c63
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000f6c2
mov esp, ebp
pop ebp
ret 8