Function at 0x40593a
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
and byte [ebp - 0x148], 0
push ebx
xor ebx, ebx
push esi
push ebx
push dword [ebp + 8]
call section..text
mov esi, eax
pop ecx
cmp esi, 0xffffffff
pop ecx
je 0x405afa
push edi
lea eax, [ebp - 0x44]
push 0xc
push eax
push esi
call fcn.00401077
movzx edi, word [ebp - 0x40]
xor eax, eax
add esp, 0xc
mov ah, byte [ebp - 0x40]
movzx eax, ax
shr edi, 8
or edi, eax
jbe 0x405af2
cmp ebx, 0x28
jae 0x405af2
lea eax, [ebp - 0x28]
push 0x10
push eax
push esi
call fcn.00401077
add esp, 0xc
test eax, eax
jne 0x405af2
cmp dword [ebp - 0x28], 0x656d616e
je 0x4059be
inc ebx
cmp ebx, edi
jb 0x40598b
jmp 0x405af2
mov eax, dword [ebp - 0x20]
mov edi, 0xff00
mov ecx, eax
mov edx, eax
and ecx, 0xff0000
shr edx, 0x10
or ecx, edx
mov edx, eax
and edx, edi
shl eax, 0x10
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
push ecx
push esi
call fcn.00401114
lea eax, [ebp - 0x18]
push 6
push eax
push esi
call fcn.00401077
xor eax, eax
add esp, 0x14
mov al, byte [ebp - 0x15]
mov ah, byte [ebp - 0x16]
mov cx, ax
add eax, 0xffff
test cx, cx
je 0x405af2
movzx eax, ax
inc eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push 0xc
push eax
push esi
call fcn.00401077
push esi
call fcn.00401103
mov ebx, eax
xor eax, eax
mov al, byte [ebp - 0xf]
add esp, 0x10
mov ah, byte [ebp - 0x10]
cmp ax, 1
jne 0x405ae9
xor eax, eax
mov al, byte [ebp - 9]
mov ah, byte [ebp - 0xa]
cmp ax, 4
jne 0x405ae9
mov eax, dword [ebp - 0x20]
mov ecx, eax
mov edx, eax
and ecx, 0xff0000
shr edx, 0x10
or ecx, edx
mov edx, eax
and edx, edi
shl eax, 0x10
or edx, eax
movzx eax, word [ebp - 0x14]
shr ecx, 8
shl edx, 8
or ecx, edx
xor edx, edx
mov dh, byte [ebp - 0x14]
movzx edx, dx
shr eax, 8
or eax, edx
xor edx, edx
mov dh, byte [ebp - 6]
add ecx, eax
movzx eax, word [ebp - 6]
movzx edx, dx
shr eax, 8
or eax, edx
add ecx, eax
push ecx
push esi
call fcn.00401114
movzx eax, word [ebp - 8]
xor ecx, ecx
mov ch, byte [ebp - 8]
movzx ecx, cx
shr eax, 8
or eax, ecx
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00401077
movzx eax, word [ebp - 8]
xor ecx, ecx
push ebx
mov ch, byte [ebp - 8]
push esi
movzx ecx, cx
shr eax, 8
or eax, ecx
and byte [ebp + eax - 0x148], 0
call fcn.00401114
add esp, 0x1c
dec dword [ebp - 4]
jne 0x405a1c
push esi
call fcn.00401229
pop ecx
pop edi
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_AddFontResourceA]
test eax, eax
je 0x405b18
push 0
push 0
push 0x1d
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageA]
cmp byte [ebp - 0x148], 0
je 0x405b85
push 0x5c
push dword [ebp + 8]
call fcn.0040a5a0
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x405b36
inc esi
jmp 0x405b39
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x148]
push str.__TrueType_
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionFonts
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push esi
call fcn.0040a290
pop ecx
push eax
push esi
push 1
lea eax, [ebp - 0x148]
push 0
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
leave
ret