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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10034030
mov eax, dword fs:[0]
push eax
sub esp, 0x52c
mov eax, dword [0x10048024]
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 0x10012982
mov dword [ebp - 0x174], 0
mov dword [ebp - 0x170], 0
push 0x80000
call fcn.1000f66d
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.1002df30
mov dword [ebp - 4], 0
lea edx, [ebp - 0x394]
push edx
lea eax, [ebp - 0x380]
push eax
lea ecx, [ebp - 0x128]
call fcn.1002de40
test eax, eax
jne 0x1001213f
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x518], eax
push 0x43c
push 0x10037f20
call fcn.10010eb0
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.1002ded0
mov eax, dword [ebp - 0x4c4]
jmp 0x10012c13
lea ecx, [ebp - 0x38c]
push ecx
lea edx, [ebp - 0x384]
push edx
lea ecx, [ebp - 0x128]
call fcn.1002ddb0
test eax, eax
jne 0x100121f6
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x51c], eax
push 0x442
push 0x10037f50
call fcn.10010eb0
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.10010e80
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.1002ded0
mov eax, dword [ebp - 0x4cc]
jmp 0x10012c13
mov edx, dword [ebp - 0x38c]
push edx
mov eax, dword [ebp - 0x394]
push eax
lea ecx, [ebp - 0x128]
call fcn.1002db00
test eax, eax
jne 0x100122b7
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x520], eax
push 0x449
push 0x10037f80
call fcn.10010eb0
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.10010e80
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.1002ded0
mov eax, dword [ebp - 0x4d4]
jmp 0x10012c13
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.10011130
add esp, 4
test eax, eax
jne 0x10012332
cmp dword [ebp - 0x388], 0
je 0x1001230b
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.1002ded0
mov eax, dword [ebp - 0x4dc]
jmp 0x10012c13
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.1002dd60
test eax, eax
jne 0x1001243c
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x524], eax
push 0x45b
push 0x10037fc8
call fcn.10010eb0
add esp, 8
push eax
push 0x10037fd8
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.10010e80
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.1002ded0
mov eax, dword [ebp - 0x4e4]
jmp 0x10012c13
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.1002dc20
test eax, eax
jne 0x1001250f
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x528], eax
push 0x463
push 0x10037ff4
call fcn.10010eb0
add esp, 8
push eax
push 0x10038004
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.10010e80
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.1002ded0
mov eax, dword [ebp - 0x4ec]
jmp 0x10012c13
mov byte [ebp - 0x16c], 0
push 0x3f
push 0
lea edx, [ebp - 0x16b]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
push 0x10038020
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 0x1001256d
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 0x1001265a
mov eax, dword [ebp - 0x388]
add eax, dword [ebp - 0x398]
movsx ecx, byte [eax]
cmp ecx, 0x7b
jne 0x100125ab
mov edx, dword [ebp - 0x388]
add edx, dword [ebp - 0x398]
mov dword [ebp - 0x12c], edx
mov eax, dword [ebp - 0x178]
push eax
push 0x1003802c
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 0x10012655
cmp dword [ebp - 0x12c], 0
je 0x10012655
mov edx, dword [ebp - 0x12c]
movsx eax, byte [edx]
cmp eax, 0x7d
je 0x1001261c
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 0x100125de
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 0x1001265a
jmp 0x1001255e
lea eax, [ebp - 0x16c]
push eax
call sub.ntdll.dll_strlen
add esp, 4
test eax, eax
jne 0x100126e9
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x52c], eax
push 0x47e
push 0x10038038
call fcn.10010eb0
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.1002ded0
mov eax, dword [ebp - 0x4f4]
jmp 0x10012c13
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.1002dd60
test eax, eax
jne 0x100127f3
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x530], eax
push 0x487
push 0x10038088
call fcn.10010eb0
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.10010e80
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.1002ded0
mov eax, dword [ebp - 0x4fc]
jmp 0x10012c13
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.1002dc20
test eax, eax
jne 0x100128e6
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x534], eax
push 0x491
push 0x100380b4
call fcn.10010eb0
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.10010e80
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.1002ded0
mov eax, dword [ebp - 0x504]
jmp 0x10012c13
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.10010e80
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 0x1001296b
mov dword [ebp - 0x50c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002ded0
mov eax, dword [ebp - 0x50c]
jmp 0x10012c13
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.1002ded0
jmp 0x10012c11
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 0x100129ab
mov eax, 1
jmp 0x10012c13
push 0x100380e0
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 0x100129d3
xor eax, eax
jmp 0x10012c13
push 0x100380e4
call sub.ntdll.dll_strlen
add esp, 4
mov dword [ebp - 0x3a4], eax
push 0x1000
call fcn.1000f66d
add esp, 4
mov dword [ebp - 0x510], eax
mov edx, dword [ebp - 0x510]
mov dword [ebp - 0x39c], edx
push pe_nt_image_headers32
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 0x10012b1b
mov eax, dword [ebp - 0x3a0]
push eax
push pe_nt_image_headers32
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 0x10012a95
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 0x10012aea
mov edx, dword [ebp - 0x3a4]
push edx
push 0x100380f4
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 0x10012ae8
push pe_nt_image_headers32
push 0
lea edx, [ebp - 0x4ac]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
jmp 0x10012aea
jmp 0x10012a86
lea eax, [ebp - 0x4ac]
push eax
mov ecx, dword [ebp - 0x39c]
push ecx
call sub.ntdll.dll_strcat
add esp, 8
push pe_nt_image_headers32
push 0
lea edx, [ebp - 0x4ac]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
jmp 0x10012a31
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 0x10038104
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 0x10012b72
xor eax, eax
jmp 0x10012c13
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 0x10012be9
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0x538], eax
push 0x4d5
push 0x10038108
call fcn.10010eb0
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 0x10012c13
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.1000f672
mov esp, ebp
pop ebp
ret 8