Function at 0x4040a0
Capabilities:
Manipulate boot configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x471700
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push esi
push edi
mov eax, dword [0x48d000]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
mov dword [ebp - 0x28], vtable.CIniFile.0
call edx
add eax, 0x10
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0x200
mov dword [ebp - 0x1c], 0x21
mov dword [ebp - 4], 0
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 1
movzx eax, word [esi + 0x70]
push eax
push 0x47ec78
lea edi, [ebp - 0x14]
call fcn.004019a0
mov ecx, dword [ebp - 0x14]
push ecx
push 0x47fc58
lea edi, [ebp - 0x24]
call fcn.004019a0
mov eax, dword [esi + 0x74]
add esp, 0x10
cmp eax, 2
jg 0x40414d
push 1
mov ecx, esi
call fcn.004060a0
jmp 0x40415b
cmp eax, 0xd
jg 0x40415b
push 1
mov ecx, esi
call fcn.00406210
mov edx, dword [ebp - 0x24]
push edx
push 0
push str.operating_systems
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionW]
mov esi, dword [ebx]
mov ecx, dword [ebx + 4]
sub ecx, esi
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor edi, edi
add eax, edx
je 0x4041e9
xor ecx, ecx
mov dword [ebp - 0x18], ecx
jmp 0x404193
mov ecx, dword [ebp - 0x18]
lea eax, [ecx + esi + 4]
mov edx, 8
cmp dword [eax + 0x14], edx
jb 0x4041a3
mov eax, dword [eax]
cmp dword [ecx + esi + 0x34], edx
lea esi, [ecx + esi + 0x20]
jb 0x4041b1
mov ecx, dword [esi]
jmp 0x4041b3
mov ecx, esi
mov esi, dword [ebp - 0x24]
push esi
push eax
push ecx
push str.operating_systems
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x404247
mov esi, dword [ebx]
mov ecx, dword [ebx + 4]
add dword [ebp - 0x18], 0x58
sub ecx, esi
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc edi
add ecx, edx
cmp edi, ecx
jb 0x404190
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40420c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404232
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
cmp eax, 2
jg 0x40425b
push 1
call fcn.00406450
jmp 0x404267
cmp eax, 0xd
jg 0x404267
push 1
call fcn.004065c0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40428a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4042ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4