Function at 0x406e10
Capabilities:
Allocate or change rwx memory
Check if file exists
Execute shellcode via indirect call
Get file attributes

Disassembly:
sub esp, 0x140
push ebx
push 0x104
push 0x719bf8
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 [0x71a630], eax
jne 0x406e4e
pop ebx
add esp, 0x140
ret
fld qword [0x4584a0]
push esi
fsin
push edi
fmul qword [0x458490]
call sub.MSVCRT.dll__ftol
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push 0x719bf8
mov dword [esp + 0x28], ebx
call esi
dec eax
test eax, eax
jle 0x406e8c
cmp byte [eax + 0x719bf8], 0x5c
je 0x406e8b
dec eax
test eax, eax
jg 0x406e7b
jmp 0x406e8c
inc eax
lea eax, [eax + 0x719bf8]
push eax
push 0x71a114
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x719bf8
call esi
dec eax
js 0x406ebb
cmp byte [eax + 0x719bf8], 0x5c
je 0x406ebb
dec eax
mov byte [eax + 0x719bf9], 0
jns 0x406ea8
mov ecx, dword [0x71a630]
add ebx, 0x3ce
cmp eax, 0xffffffff
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], ecx
jg 0x406ed6
xor eax, eax
mov byte [eax + 0x719bf8], 0
mov al, byte [0x719bf8]
test al, al
je 0x406ef8
push 0x484668
push 0x719bf8
call fcn.0040e790
add esp, 8
lea ecx, [ebx + 0x3f0]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 0
fild qword [esp + 0x18]
push ebp
fsqrt
call sub.MSVCRT.dll__ftol
shl ebx, 0x1b
mov ecx, 0x466860
mov dword [esp + 0x1c], ebx
sub ecx, eax
mov dword [esp + 0x18], 2
mov esi, ebx
xor eax, eax
mov dl, al
shl dl, 3
mov byte [esp + eax + 0x2c], dl
inc eax
cmp eax, 0x1f
jl 0x406f30
mov eax, dword [ecx]
mov dword [esp + 0x14], 0
add ecx, 4
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
neg edx
shr esi, 1
jne 0x406f61
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
test edx, edx
je 0x406f86
mov dl, byte [ecx]
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
inc edi
mov byte [edi - 1], dl
mov byte [esp + ebp + 0x2c], dl
inc ecx
inc ebp
and ebp, 0x1f
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebp
jmp 0x406f4c
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
neg edx
shr esi, 1
jne 0x406f9b
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
test edx, edx
jne 0x407032
mov edi, eax
and edi, esi
neg edi
sbb edi, edi
neg edi
shr esi, 1
jne 0x406fb8
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
neg edx
add edi, edi
or edx, edi
shr esi, 1
jne 0x406fd1
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edi, eax
and edi, esi
neg edi
sbb edi, edi
neg edi
add edx, edx
or edi, edx
shr esi, 1
jne 0x406fea
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
neg edx
add edi, edi
or edx, edi
shr esi, 1
jne 0x407003
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edi, eax
and edi, esi
neg edi
sbb edi, edi
neg edi
add edx, edx
or edi, edx
shr esi, 1
jne 0x40701c
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov dl, byte [esp + edi + 0x2c]
mov edi, dword [esp + 0x10]
mov byte [edi], dl
mov edx, edi
inc edx
mov dword [esp + 0x10], edx
jmp 0x406f4c
xor edx, edx
mov dx, word [ecx]
mov edi, edx
and edi, 0x7f
je 0x40706a
shr edx, 7
or edx, 0xfffffe00
test edi, edi
mov ebp, edx
jle 0x407062
mov edx, dword [esp + 0x10]
mov bl, byte [edx + ebp]
mov byte [edx], bl
inc edx
dec edi
mov dword [esp + 0x10], edx
jne 0x40704d
mov ebx, dword [esp + 0x1c]
add ecx, 2
jmp 0x406f4c
mov eax, dword [0x71a630]
add eax, 0x1000
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
mov ecx, 0x4669b0
sub ecx, 0x20
dec eax
mov dword [esp + 0x18], eax
jne 0x406f2c
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 [0x617e6c]
test al, al
je 0x4070ff
push 0x5c
push 0x617e6c
call sub.MSVCRT.dll_strchr
add esp, 8
test eax, eax
jne 0x4070e5
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x45d2e4
lea ecx, [esp + 0x50]
push ecx
call edi
jmp 0x4070eb
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x617e6c
lea edx, [esp + 0x50]
push edx
call esi
jmp 0x407127
push 0x719bf8
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.RIO.INI
lea ecx, [esp + 0x50]
push ecx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add bl, 0x14
mov byte [ebp + 0x3a1], bl
mov eax, dword [0x71a640]
cmp eax, 0x100
pop ebp
jge 0x40715a
mov edx, eax
shl edx, 6
add edx, eax
lea eax, [edx*4 + 0x501380]
mov byte [eax], 0
add eax, 0x104
cmp eax, 0x511780
jl 0x40714b
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4071c7
push 0x719bf8
lea ecx, [esp + 0x4c]
push ecx
call edi
push 0x71a114
lea edx, [esp + 0x4c]
push edx
call esi
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.USER32.dll_CharUpperA]
lea ecx, [esp + 0x48]
push str..EXE
push ecx
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x4071bf
lea edx, [esp + 0x48]
push str..SCR
push edx
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x4071bf
mov byte [esp + 0x48], al
jmp 0x4071dc
push str..INI
push eax
call edi
mov al, byte [esp + 0x48]
test al, al
je 0x4071dc
lea eax, [esp + 0x48]
push eax
call fcn.004068f0
add esp, 4
mov ecx, dword [0x71a630]
mov esi, dword [0x461ff8]
mov edi, dword [0x461ffc]
add ecx, 0x1000
mov dword [0x466af0], ecx
call fcn.0040c030
test eax, eax
mov ebx, 1
je 0x40722a
cmp esi, dword [0x461ff8]
jne 0x407218
cmp edi, dword [0x461ffc]
je 0x407224
mov dword [0x461ff8], esi
mov dword [0x461ffc], edi
mov dword [0x71a644], ebx
mov eax, dword [0x71a644]
test eax, eax
mov edx, dword [0x71a630]
pop edi
mov dword [0x466980], edx
pop esi
jne 0x407268
push 0x484668
push 0x7197b0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [0x71a644], ebx
call fcn.0040c200
test eax, eax
jne 0x407268
pop ebx
add esp, 0x140
ret
mov eax, ebx
pop ebx
add esp, 0x140
ret