Function at 0x404330
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
push edi
push 0x104
push 0x5ae62c
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
fld qword [0x42e398]
fsin
fmul qword [0x42e390]
call fcn.00421e7c
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push 0x5ae62c
mov dword [esp + 0x2c], esi
call edi
dec eax
mov bl, 0x5c
js 0x404385
cmp byte [eax + 0x5ae62c], bl
je 0x404384
dec eax
jns 0x404377
jmp 0x404385
inc eax
lea eax, [eax + 0x5ae62c]
push eax
push 0x5aeb44
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x5ae62c
call edi
dec eax
js 0x4043b3
cmp byte [eax + 0x5ae62c], bl
je 0x4043b3
mov byte [eax + 0x5ae62c], 0
dec eax
jns 0x4043a1
add esi, 0x3ce
mov ecx, 0x43c260
sub ecx, esi
cmp eax, 0xffffffff
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], ecx
jg 0x4043cf
xor eax, eax
mov byte [eax + 0x5ae62c], 0
mov al, byte [0x5ae62c]
test al, al
je 0x4043f1
push 0x43cd9c
push 0x5ae62c
call fcn.00407600
add esp, 8
mov ebx, esi
add esi, 0x3f0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0
fild qword [esp + 0x1c]
fsqrt
call fcn.00421e7c
shl ebx, 0x1b
mov ecx, 0x43c670
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 0x40442a
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 0x40445b
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
test edx, edx
je 0x40447f
mov edi, dword [esp + 0x10]
mov dl, byte [ecx]
mov ebp, dword [esp + 0x14]
mov byte [edi], dl
inc edi
mov byte [esp + ebp + 0x2c], dl
inc ecx
inc ebp
mov dword [esp + 0x10], edi
and ebp, 0x1f
mov dword [esp + 0x14], ebp
jmp 0x404446
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
neg edx
shr esi, 1
jne 0x404494
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
test edx, edx
jne 0x40452b
mov edi, eax
and edi, esi
neg edi
sbb edi, edi
neg edi
shr esi, 1
jne 0x4044b1
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
add edi, edi
neg edx
or edx, edi
shr esi, 1
jne 0x4044ca
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edi, eax
and edi, esi
neg edi
sbb edi, edi
add edx, edx
neg edi
or edi, edx
shr esi, 1
jne 0x4044e3
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edx, eax
and edx, esi
neg edx
sbb edx, edx
add edi, edi
neg edx
or edx, edi
shr esi, 1
jne 0x4044fc
mov eax, dword [ecx]
mov esi, ebx
add ecx, 4
mov edi, eax
and edi, esi
neg edi
sbb edi, edi
add edx, edx
neg edi
or edi, edx
shr esi, 1
jne 0x404515
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 0x404446
xor edx, edx
mov dx, word [ecx]
mov edi, edx
and edi, 0x7f
je 0x404563
shr edx, 7
or edx, 0xfffffe00
test edi, edi
mov ebp, edx
jle 0x40455b
mov edx, dword [esp + 0x10]
mov bl, byte [edx + ebp]
mov byte [edx], bl
inc edx
dec edi
mov dword [esp + 0x10], edx
jne 0x404546
mov ebx, dword [esp + 0x1c]
add ecx, 2
jmp 0x404446
mov eax, 0x43b8f0
mov ecx, 0x43c100
sub eax, 0x10
sub ecx, 0x20
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x404426
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
add ebx, 0x3bd
mov dword [edi + 0x5f], ebx
mov al, byte [0x5680a0]
test al, al
je 0x4045ba
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x4c]
push 0x5680a0
push eax
call esi
jmp 0x4045dc
lea ecx, [esp + 0x4c]
push 0x5ae62c
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x4c]
push str.RIO.INI
push edx
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add bl, 0x14
mov byte [edi + 0x3a1], bl
mov eax, dword [0x5af060]
cmp eax, 0x100
jge 0x40460e
mov ecx, eax
shl ecx, 6
add ecx, eax
lea eax, [ecx*4 + 0x459958]
mov byte [eax], 0
add eax, 0x104
cmp eax, 0x469d58
jl 0x4045ff
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40467b
lea eax, [esp + 0x4c]
push 0x5ae62c
push eax
call esi
lea ecx, [esp + 0x4c]
push 0x5aeb44
push ecx
call ebp
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.USER32.dll_CharUpperA]
lea eax, [esp + 0x4c]
push str..EXE
push eax
call fcn.00421fe0
add esp, 8
test eax, eax
jne 0x404673
lea ecx, [esp + 0x4c]
push str..SCR
push ecx
call fcn.00421fe0
add esp, 8
test eax, eax
jne 0x404673
mov byte [esp + 0x4c], al
jmp 0x404690
push str..INI
push eax
call esi
mov al, byte [esp + 0x4c]
test al, al
je 0x404690
lea edx, [esp + 0x4c]
push edx
call fcn.004040a0
add esp, 4
mov edi, dword [0x4342c4]
mov ebx, dword [0x4342c8]
call fcn.00405620
test eax, eax
mov ebp, 1
je 0x4046d9
cmp edi, dword [0x4342c4]
jne 0x4046ba
cmp ebx, dword [0x4342c8]
je 0x4046c6
mov dword [0x4342c4], edi
mov dword [0x4342c8], ebx
mov dword [0x5af064], ebp
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x140
ret
mov eax, dword [0x5af064]
test eax, eax
jne 0x4046cc
push 0x43cd9c
push 0x5ae1f8
call esi
mov dword [0x5af064], ebp
call fcn.004057f0
test eax, eax
jne 0x4046cc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret