Function at 0x4017e0
Capabilities:
Check if file exists
Encrypt data using rc4 ksa
Get file size
Read file on windows

Disassembly:
mov eax, dword [0x46a23c]
test eax, eax
je 0x4017f6
mov dword [esp + 0x18], 7
jmp fcn.004084b0
mov eax, dword [esp + 0x18]
cmp ax, 0x55
je 0x401813
cmp ax, 1
jl 0x40180c
cmp ax, 3
jle 0x401813
or ax, 0xffff
ret 0x18
mov ecx, dword [0x429004]
test ecx, ecx
je 0x401844
cmp ax, 0x55
jne 0x401844
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push edx
mov edx, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
push ecx
push edx
push eax
call fcn.00405f30
ret 0x18
mov ecx, dword [0x429008]
test ecx, ecx
je 0x401863
cmp ax, 1
jl 0x401863
cmp ax, 3
jg 0x401863
mov dword [esp + 0x18], eax
jmp 0x404330
xor ax, ax
ret 0x18
sub esp, 8
mov eax, dword [0x429298]
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
mov esi, dword [esp + 0x28]
mov dword [esp + 8], ebx
jne 0x404362
movsx eax, si
push eax
call fcn.00407700
cmp ax, bx
jl 0x4045bb
mov dword [esp + 8], 1
push edi
mov edi, dword [esp + 0x28]
cmp di, bx
jne 0x404378
mov dword [esp + 0x28], 1
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0xc]
call fcn.00403c70
mov ecx, dword [esp + 0x20]
cmp cx, 1
jg 0x404391
mov dword [esp + 0x2c], ebx
jmp 0x4043b1
movsx eax, cx
shl eax, 2
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x2c], eax
shl eax, 6
sub ecx, eax
shl ecx, 2
mov ebx, ecx
push ebp
push esi
push edi
call fcn.00404130
movsx eax, ax
cdq
and edx, 3
add eax, edx
mov ebp, eax
sar ebp, 2
test bx, bx
jle 0x404407
movsx ecx, bp
movsx eax, bx
lea edx, [ecx*4]
cmp eax, edx
jle 0x4043e4
lea ebx, [ebp*4]
movsx eax, bx
cdq
and edx, 3
add eax, edx
movsx edx, word [esp + 0x28]
sar eax, 2
sub ecx, eax
inc ecx
cmp edx, ecx
jle 0x404412
mov ecx, ebp
sub ecx, eax
inc ecx
mov dword [esp + 0x28], ecx
jmp 0x404412
cmp word [esp + 0x28], bp
jle 0x404412
mov dword [esp + 0x28], ebp
push edi
call fcn.00402cd0
test ax, ax
je 0x4045a9
lea esi, [esp + 0x24]
lea edi, [esp + 0x14]
call fcn.004032c0
test ax, ax
jge 0x40444b
mov eax, dword [esp + 0x10]
push eax
call fcn.00403d00
pop ebp
pop edi
pop esi
or ax, 0xffff
pop ebx
add esp, 8
ret 0x18
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
call fcn.00403410
mov esi, eax
cmp si, 1
je 0x4044a0
mov edx, dword [esp + 0x10]
push edx
call fcn.00403d00
cmp si, 0x53
jne 0x40448a
pop ebp
pop edi
pop esi
mov ax, 0xfffc
pop ebx
add esp, 8
ret 0x18
xor eax, eax
cmp si, 0x55
setne al
pop ebp
pop edi
pop esi
pop ebx
add eax, 0xfffffffe
add esp, 8
ret 0x18
cmp byte [0x46a260], 0xd
ja 0x4044c0
movsx eax, bp
shl eax, 2
cmp eax, 0xfc
mov dword [esp + 0x30], 0
jle 0x4044c0
xor ebx, ebx
call fcn.00402640
push 0
push 1
mov al, 0x39
call fcn.004027e0
test eax, eax
jne 0x4044ec
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00403d00
pop ebp
pop edi
pop esi
or ax, 0xffff
pop ebx
add esp, 8
ret 0x18
mov al, byte [esp + 0x30]
push 0
push 1
call fcn.004027e0
test eax, eax
jne 0x404515
mov edx, dword [esp + 0x10]
push edx
call fcn.00403d00
pop ebp
pop edi
pop esi
or ax, 0xffff
pop ebx
add esp, 8
ret 0x18
call fcn.004026d0
call fcn.00402640
cmp word [esp + 0x30], 0
jg 0x404531
test bx, bx
jg 0x404531
mov ebx, 4
push 0
push 1
mov al, 0x30
call fcn.004027e0
test eax, eax
je 0x404433
mov ecx, dword [0x429140]
push ecx
push 1
mov al, bl
call fcn.004027e0
test eax, eax
je 0x4044fd
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
movsx edi, bp
shl edi, 2
xor ebx, ebx
test edi, edi
jle 0x4045a0
lea esp, [esp]
mov eax, dword [0x429140]
push eax
push 0
call fcn.00402a40
mov ecx, dword [0x429144]
test ecx, ecx
mov byte [esi], al
je 0x404597
add al, byte [esp + 0x24]
mov cl, byte [esp + 0x14]
inc al
xor al, cl
mov byte [esi], al
inc esi
inc ebx
movsx ecx, bx
cmp ecx, edi
jl 0x404570
mov esi, ebp
call fcn.004026d0
jmp 0x4045ac
or esi, 0xffffffff
mov edx, dword [esp + 0x10]
push edx
call fcn.00403d00
pop ebp
mov ax, si
pop edi
pop esi
pop ebx
add esp, 8
ret 0x18