Function at 0x4085c0
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 0x13b4720
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x40
push 0x1000
push 0x14400
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x13b5158], eax
jne 0x408600
pop esi
pop ebx
add esp, 0x140
ret
fld qword [0x47b518]
fsin
fmul qword [0x47b508]
call fcn.00407cf0
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push 0x13b4720
mov dword [esp + 0x24], ebx
call esi
dec eax
test eax, eax
jle 0x40863c
cmp byte [eax + 0x13b4720], 0x5c
je 0x40863b
dec eax
test eax, eax
jg 0x40862b
jmp 0x40863c
inc eax
lea eax, [eax + 0x13b4720]
push eax
push 0x13b4c3c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [0x13b5158]
add ecx, 0x4000
push ecx
call fcn.00414760
add esp, 4
test eax, eax
je 0x408672
pop esi
xor eax, eax
pop ebx
add esp, 0x140
ret
push 0x13b4720
call esi
dec eax
js 0x40868f
cmp byte [eax + 0x13b4720], 0x5c
je 0x40868f
dec eax
mov byte [eax + 0x13b4721], 0
jns 0x40867c
mov ecx, dword [0x13b5158]
add ebx, 0x3ce
cmp eax, 0xffffffff
mov dword [esp + 8], ecx
mov dword [esp + 0x1c], ecx
jg 0x4086aa
xor eax, eax
mov byte [eax + 0x13b4720], 0
mov al, byte [0x13b4720]
test al, al
je 0x4086cc
push 0x4b3e14
push 0x13b4720
call fcn.004139c0
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.00407cf0
shl ebx, 0x1b
mov esi, 0x4987b0
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 0x408705
mov ebp, dword [esi]
add esi, 4
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
shr edi, 1
jne 0x40872e
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
test eax, eax
je 0x40875a
push 0x1e
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x35]
push eax
call fcn.00443ed0
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 0x408719
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
shr edi, 1
jne 0x40876f
mov ebp, dword [esi]
mov edi, ebx
add esi, 4
test eax, eax
jne 0x408821
mov eax, ebp
and eax, edi
neg eax
sbb eax, eax
neg eax
shr edi, 1
jne 0x40878c
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 0x4087a6
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 0x4087bf
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 0x4087d9
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 0x4087f2
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.00443ed0
mov byte [esp + 0x38], bl
mov ebx, dword [esp + 0x28]
add esp, 0xc
jmp 0x408719
xor eax, eax
mov ax, word [esi]
mov ecx, eax
and ecx, 0x7f
je 0x40885e
shr eax, 7
or eax, 0xfffffe00
test ecx, ecx
jle 0x408856
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 0x40883d
add esi, 2
jmp 0x408719
mov edx, dword [0x13b5158]
mov eax, dword [esp + 0x18]
mov esi, 0x498900
add edx, 0x1000
sub esi, 0x20
dec eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], eax
jne 0x408701
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 [0xbcc9f4]
test al, al
je 0x4088f5
push 0x5c
push 0xbcc9f4
call fcn.00444fd0
add esp, 8
test eax, eax
jne 0x4088db
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x482528
lea eax, [esp + 0x50]
push eax
call edi
jmp 0x4088e1
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0xbcc9f4
lea ecx, [esp + 0x50]
push ecx
call esi
jmp 0x40891d
push 0x13b4720
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 [0x13b5168]
cmp eax, 0x100
jge 0x40894f
mov ecx, eax
shl ecx, 6
add ecx, eax
lea eax, [ecx*4 + 0x7e27cc]
mov byte [eax], 0
add eax, 0x104
cmp eax, 0x7f2bcc
jl 0x408940
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4089bc
push 0x13b4720
lea eax, [esp + 0x50]
push eax
call edi
push 0x13b4c3c
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.00445110
add esp, 8
test eax, eax
jne 0x4089b4
lea ecx, [esp + 0x4c]
push str..SCR
push ecx
call fcn.00445110
add esp, 8
test eax, eax
jne 0x4089b4
mov byte [esp + 0x4c], al
jmp 0x4089d1
push str..INI
push eax
call edi
mov al, byte [esp + 0x4c]
test al, al
je 0x4089d1
lea edx, [esp + 0x4c]
push edx
call fcn.00407ec0
add esp, 4
mov eax, dword [0x7e17c4]
push 3
mov ebx, 1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ecx, dword [0x7e17c4]
mov esi, eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edx, dword [0x7e17c4]
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.0044fad0
mov ecx, dword [0x487ddc]
add esp, 8
cmp ecx, eax
jne 0x408a28
mov dword [0x487ddc], ebx
jmp 0x408a36
xor ecx, ecx
mov dword [0x487ddc], ecx
mov dword [0x487f20], ecx
mov edx, dword [0x13b41bc]
mov esi, dword [0x487f34]
mov edi, dword [0x487f38]
xor edx, eax
mov eax, dword [0x13b5158]
add eax, 0x1000
mov dword [0x13b41bc], edx
mov dword [0x498a40], eax
call fcn.0040fd40
test eax, eax
je 0x408a8a
cmp esi, dword [0x487f34]
jne 0x408a78
cmp edi, dword [0x487f38]
je 0x408a84
mov dword [0x487f34], esi
mov dword [0x487f38], edi
mov dword [0x13b516c], ebx
mov eax, dword [0x13b516c]
test eax, eax
mov ecx, dword [0x13b5158]
pop edi
mov dword [0x4988d0], ecx
pop ebp
jne 0x408ac9
push 0x4b3e14
push 0x13b41c4
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [0x13b516c], ebx
call fcn.0040ff10
test eax, eax
jne 0x408ac9
pop esi
pop ebx
add esp, 0x140
ret
mov edx, dword [0x13b5158]
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