Function at 0x40bc70
Capabilities:
Encode data using xor
Encrypt data using rc4 prga
Read file on windows

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
mov ebp, ecx
push edi
push dword [esp + 0x1c]
mov edi, edx
push ebp
push edi
push esi
call fcn.0041ab7a
mov ebx, eax
add esp, 0x10
cmp dword [esp + 0x14], 0
mov dword [esp + 0x18], ebx
lea edx, [esi + ebx*4]
jne 0x43845e
cmp edi, 1
je 0x43843d
cmp edi, 2
je 0x40bce7
cmp edi, 3
jne 0x40bd1d
lea edi, [ebx - 1]
lea edi, [edi + edi*2]
test edi, edi
js 0x40bd0d
lea esp, [esp]
movzx ecx, byte [esi + edi + 2]
lea edx, [edx - 4]
movzx eax, byte [esi + edi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + edi]
shl ecx, 8
or ecx, eax
shl ecx, 8
sub edi, 3
mov dword [edx], ecx
jns 0x40bcc0
jmp 0x40bd0d
lea edi, [ebx*2 - 2]
test edi, edi
js 0x40bd0d
movzx ecx, byte [edi + esi + 1]
lea edx, [edx - 4]
movzx eax, byte [edi + esi]
shl ecx, 8
or ecx, eax
shl ecx, 0x10
sub edi, 2
mov dword [edx], ecx
jns 0x40bcf2
cmp dword [0x478248], 0
jne 0x40bd71
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret
cmp edi, 4
jne 0x40bd0d
lea ebx, [ebx*4 - 4]
test ebx, ebx
js 0x40bdcf
lea edi, [esi + 2]
add edi, ebx
add ebx, 4
shr ebx, 2
lea esp, [esp]
movzx ecx, byte [edi + 1]
lea edx, [edx - 4]
movzx eax, byte [edi]
lea edi, [edi - 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
mov dword [edx], ecx
sub ebx, 1
jne 0x40bd40
mov ebx, dword [esp + 0x18]
jmp 0x40bd0d
xor edi, edi
test ebp, ebp
jle 0x40bd16
fld1
fld dword [0x4523d8]
fldz
fld dword [0x4523bc]
fld dword [0x4523b4]
fld dword [esi + edi*4]
fcom st(5)
fnstsw ax
test ah, 1
je 0x40bdd6
fcom st(4)
fnstsw ax
test ah, 0x41
jnp 0x40bddf
fcom st(3)
fnstsw ax
fmul st(2)
test ah, 1
je 0x40bdcb
fsub st(1)
call fcn.00430da0
mov dword [esi + edi*4], eax
inc edi
cmp edi, ebp
jl 0x40bd8d
fstp st(1)
fstp st(0)
fstp st(1)
fstp st(0)
fstp st(0)
jmp 0x40bd16
fadd st(1)
jmp 0x40bdaf
mov ebx, eax
jmp 0x40bd0d
fstp st(0)
mov eax, 0x7fffffff
jmp 0x40bdb4
fstp st(0)
mov eax, 0x80000000
jmp 0x40bdb4
lea ecx, [ebx - 1]
test ecx, ecx
js 0x40bd0d
movzx eax, byte [ecx + esi]
lea edx, [edx - 4]
shl eax, 0x18
sub ecx, 1
mov dword [edx], eax
jns 0x438448
jmp 0x40bd0d
cmp edi, 1
jne 0x43848e
lea ecx, [ebx - 1]
test ecx, ecx
js 0x40bd0d
movzx eax, byte [ecx + esi]
lea edx, [edx - 4]
shl eax, 0x18
xor eax, 0x807f0000
or eax, 0x7f0000
sub ecx, 1
mov dword [edx], eax
jns 0x43846e
jmp 0x40bd0d
cmp edi, 2
jne 0x4384c2
lea edi, [ebx*2 - 2]
test edi, edi
js 0x40bd0d
movzx ecx, byte [edi + esi]
lea edx, [edx - 4]
movzx eax, byte [edi + esi + 1]
shl ecx, 8
or ecx, eax
shl ecx, 0x10
sub edi, 2
mov dword [edx], ecx
jns 0x4384a2
jmp 0x40bd0d
cmp edi, 3
jne 0x4384ff
lea edi, [ebx - 1]
lea edi, [edi + edi*2]
test edi, edi
js 0x40bd0d
movzx ecx, byte [esi + edi]
lea edx, [edx - 4]
movzx eax, byte [esi + edi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + edi + 2]
shl ecx, 8
or ecx, eax
shl ecx, 8
sub edi, 3
mov dword [edx], ecx
jns 0x4384d5
jmp 0x40bd0d
cmp edi, 4
jne 0x40bd0d
lea ebx, [ebx*4 - 4]
test ebx, ebx
js 0x40bdcf
lea edi, [esi + 2]
add edi, ebx
add ebx, 4
shr ebx, 2
movzx ecx, byte [edi - 2]
lea edx, [edx - 4]
movzx eax, byte [edi - 1]
lea edi, [edi - 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 5]
shl ecx, 8
or ecx, eax
mov dword [edx], ecx
sub ebx, 1
jne 0x438522
mov ebx, dword [esp + 0x18]
jmp 0x40bd0d