Function at 0x4086c9
Capabilities:
Delete registry value
Get file size
Parse pe header
Read file via mapping
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x770
push ebx
push esi
push edi
mov edi, 0x105
xor ebx, ebx
push edi
lea eax, [ebp - 0x564]
push ebx
push eax
xor esi, esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
call sub.MSVCRT.dll_memset
push 0x20a
lea eax, [ebp - 0x770]
push ebx
push eax
call sub.MSVCRT.dll_memset
push ebx
call fcn.00407f0a
add esp, 0x1c
test eax, eax
push edi
je 0x408722
lea eax, [ebp - 0x770]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x408730
lea eax, [ebp - 0x564]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, ebx
jne 0x40873b
push 1
jmp 0x4087c7
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x770]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x408764
push 2
jmp 0x4087c7
push ebx
push ebx
push ebx
push 2
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push ebx
push ebx
push ebx
push 4
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x30], edi
jne 0x40879f
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
push 4
jmp 0x4087c7
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x4087da
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push 5
pop esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, esi
jmp 0x408d58
lea ecx, [eax + edi]
cmp eax, ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp + 0x14], edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], eax
jle 0x408889
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
neg eax
sbb eax, eax
mov dword [ebp - 0x10], ecx
and eax, 0x7e00
add eax, 0x200
cmp ecx, eax
jl 0x40880f
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push dword [ebp + 0x14]
push 0x429814
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0xc], ebx
jne 0x408877
push 0x1c
lea eax, [ebp - 0x5c]
push 0x429814
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
test dword [ebp - 0x5c], 0xfffffff0
jne 0x408877
cmp dword [ebp - 0x58], 0xdeadbeef
jne 0x408877
cmp dword [ebp - 0x4c], 0x74736e49
jne 0x408877
cmp dword [ebp - 0x50], 0x74666f73
jne 0x408877
cmp dword [ebp - 0x54], 0x6c6c754e
jne 0x408877
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], 1
lea esi, [eax + ecx]
mov eax, dword [ebp - 0x10]
sub dword [ebp - 8], eax
add dword [ebp + 0x14], eax
cmp dword [ebp - 8], ebx
jg 0x4087f1
cmp word [edi], 0x5a4d
je 0x408894
push 6
jmp 0x4088db
mov eax, dword [edi + 0x3c]
add eax, edi
cmp dword [eax], 0x4550
je 0x4088a5
push 7
jmp 0x4088db
cmp esi, ebx
jne 0x4088d2
movzx ecx, word [eax + 0x14]
movzx edx, word [eax + 6]
mov esi, dword [ecx + eax + 0x2c]
lea ecx, [ecx + eax + 0x18]
add esi, edi
cmp edx, ebx
jle 0x4088ca
add ecx, 0x10
add esi, dword [ecx]
add ecx, 0x28
dec edx
jne 0x4088c2
cmp esi, ebx
jne 0x4088d2
push 8
jmp 0x4088db
mov ecx, dword [ebp - 0x14]
cmp ecx, esi
ja 0x4088fa
push 9
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
push dword [ebp - 0x20]
call esi
push dword [ebp - 4]
call esi
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, ebx
jmp 0x408d58
mov eax, dword [eax + 0x98]
cmp eax, ebx
je 0x408927
lea ecx, [eax + edi]
cmp esi, ecx
jne 0x408927
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x408d55
sub ecx, esi
mov edi, ecx
push edi
mov dword [ebp - 0x24], edi
call sub.MSVCRT.dll_malloc
push edi
push ebx
push eax
mov dword [ebp + 0x14], eax
call sub.MSVCRT.dll_memset
push edi
mov edi, dword [ebp + 0x14]
push esi
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0x1c
cmp byte [esi], 0x3c
je 0x408b10
mov esi, 0xff
lea eax, [ebp - 0x15c]
push esi
push ebx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], ebx
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x35c]
push ebx
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x45c]
push ebx
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x25c]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, edi
movzx ecx, byte [eax]
lea edi, [ecx + eax + 1]
mov al, byte [ecx + eax + 1]
inc edi
movzx eax, al
mov dword [ebp - 0x38], eax
push eax
lea eax, [ebp - 0x15c]
push edi
push eax
call sub.MSVCRT.dll_memcpy
mov al, byte [edi + esi]
add edi, esi
movzx eax, al
inc edi
mov dword [ebp - 0x40], eax
push eax
lea eax, [ebp - 0x35c]
push edi
push eax
call sub.MSVCRT.dll_memcpy
mov al, byte [edi + esi]
add edi, esi
movzx eax, al
add esp, 0x48
inc edi
mov dword [ebp - 0x34], eax
push eax
lea eax, [ebp - 0x45c]
push edi
push eax
call sub.MSVCRT.dll_memcpy
mov al, byte [edi + esi]
add edi, esi
movzx eax, al
inc edi
mov dword [ebp - 0x3c], eax
push eax
lea eax, [ebp - 0x25c]
push edi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
add edi, esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
xor esi, esi
cmp esi, 8
jb 0x408a32
mov eax, dword [ebp - 0x14]
add eax, 8
cmp esi, eax
jae 0x408acb
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x38]
jne 0x408a3d
mov dword [ebp - 0x28], ebx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x40]
jne 0x408a48
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x34]
jne 0x408a53
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x3c]
jne 0x408a5e
mov dword [ebp - 8], ebx
mov ecx, dword [ebp - 0x28]
lea eax, [esi + edi]
mov cl, byte [ebp + ecx - 0x15c]
xor byte [eax], cl
mov ecx, dword [ebp - 0x10]
mov dl, byte [eax]
mov cl, byte [ebp + ecx - 0x35c]
xor cl, dl
mov edx, dword [ebp - 0xc]
mov byte [eax], cl
mov dl, byte [ebp + edx - 0x45c]
xor dl, cl
mov ecx, dword [ebp - 8]
mov byte [eax], dl
mov cl, byte [ebp + ecx - 0x25c]
xor cl, dl
cmp esi, 7
mov byte [eax], cl
jne 0x408aab
mov eax, dword [edi]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x14], eax
jmp 0x408ab9
cmp esi, 8
jne 0x408ab9
cmp cl, 0x3c
jne 0x408d2e
inc esi
inc dword [ebp - 0x28]
inc dword [ebp - 0x10]
inc dword [ebp - 0xc]
inc dword [ebp - 8]
jmp 0x408a1f
add edi, 8
cmp dword [ebp - 0x2c], ebx
jbe 0x408ae7
mov eax, dword [ebp - 0x24]
add eax, 0xa
push eax
push dword [ebp + 0x14]
call sub.MSVCRT.dll_realloc
pop ecx
mov dword [ebp + 0x14], eax
pop ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
cmp eax, ebx
lea esi, [eax + ecx]
mov dword [ebp - 0x24], esi
jbe 0x408b10
push 0xa
lea eax, [esi + edi]
push str.__LICENSE_
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add esi, 0xa
mov dword [ebp - 0x24], esi
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x24], ebx
mov dword [ebp - 8], ebx
jle 0x408c1f
mov eax, dword [ebp - 0x24]
xor esi, esi
sub eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [ebp - 0x14], eax
jb 0x408b8d
push eax
mov eax, dword [ebp - 4]
push dword [eax - 8]
push edi
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
je 0x408b99
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
cmp dword [ebp - 0x14], eax
jb 0x408b8d
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x10], ebx
je 0x408b8d
push eax
mov eax, ecx
push dword [eax + 4]
push edi
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
je 0x408bab
add dword [ebp - 4], 0x34
inc esi
cmp esi, 0x11
jb 0x408b49
jmp 0x408c0f
imul esi, esi, 0x34
mov eax, dword [ebp + 0x10]
add eax, esi
mov ecx, dword [eax + 0x10]
add ecx, edi
mov dword [eax + 0x20], ecx
jmp 0x408c0f
imul esi, esi, 0x34
mov eax, dword [ebp + 0x10]
add esi, eax
mov eax, edi
mov dword [esi + 0x24], edi
sub eax, dword [esi + 0x20]
mov dword [esi + 0x2c], eax
mov ecx, dword [esi + 4]
cmp ecx, ebx
jne 0x408bee
inc eax
push eax
call sub.MSVCRT.dll_malloc
pop ecx
mov dword [esi + 0x28], eax
mov ecx, dword [esi + 0x2c]
cmp ecx, ebx
jbe 0x408be3
inc ecx
push ecx
push dword [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
mov byte [eax + ecx], bl
jmp 0x408c0f
cmp ecx, 1
jne 0x408c0f
cmp eax, ebx
jbe 0x408c0f
push eax
call sub.MSVCRT.dll_malloc
mov dword [esi + 0x28], eax
push dword [esi + 0x2c]
push dword [esi + 0x20]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x10
inc dword [ebp - 8]
inc edi
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x24]
jl 0x408b35
cmp dword [ebp + 0x14], ebx
je 0x408c2d
push dword [ebp + 0x14]
call sub.MSVCRT.dll_free
pop ecx
lea eax, [ebp - 0x18]
push ebx
push eax
mov edi, 0x2001f
push ebx
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push ebx
push ebx
push ebx
push dword [ebp + 8]
push 0x80000002
call esi
lea eax, [ebp - 0x1c]
push ebx
push eax
push ebx
push edi
push ebx
push ebx
push ebx
push dword [ebp + 8]
push 0x80000001
call esi
mov eax, dword [ebp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp + 0x10], 0x11
lea esi, [eax + 0x2c]
cmp dword [esi - 0x28], ebx
jne 0x408d04
cmp dword [ebp + 0xc], ebx
je 0x408c9e
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x408d04
push dword [esi + 4]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x408d04
mov edx, dword [esi - 4]
cmp edx, ebx
je 0x408ce2
mov eax, dword [esi]
cmp eax, ebx
jbe 0x408ce2
mov ecx, dword [esi + 4]
cmp ecx, ebx
je 0x408ce2
cmp dword [ebp - 0x18], ebx
je 0x408cc9
cmp dword [esi - 0x2c], 3
je 0x408cc9
inc eax
push eax
push edx
push 1
push ebx
push ecx
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 0x1c], ebx
je 0x408d04
mov eax, dword [esi]
inc eax
push eax
push dword [esi - 4]
push 1
push ebx
push dword [esi + 4]
push dword [ebp - 0x1c]
call edi
jmp 0x408d04
cmp dword [ebp - 0x18], ebx
je 0x408cf3
push dword [esi + 4]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp dword [ebp - 0x1c], ebx
je 0x408d04
push dword [esi + 4]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
add esi, 0x34
dec dword [ebp + 0x10]
jne 0x408c73
cmp dword [ebp - 0x18], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x408d20
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0x1c], ebx
je 0x408d2a
push dword [ebp - 0x1c]
call esi
xor eax, eax
jmp 0x408d58
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp + 0x14], ebx
je 0x408d55
push dword [ebp + 0x14]
call sub.MSVCRT.dll_free
pop ecx
push 9
pop eax
pop edi
pop esi
pop ebx
leave
ret