Function at 0x406460
Capabilities:
Encrypt data using rc4 ksa
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42d948
push eax
mov dword fs:[0], esp
sub esp, 0x10
lea eax, [esp + 0x20]
push ebx
push ebp
xor ebx, ebx
push esi
test eax, eax
push edi
jne 0x406984
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_LockFile]
xor eax, eax
movsx ecx, ax
mov byte [esp + ecx + 0x18], al
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4064a4
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4064b4
inc eax
cmp ax, 0x100
jl 0x406497
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4064cb
mov byte [esp + 0x10], bl
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x14], bl
jmp 0x4064ed
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4064f3
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406503
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406513
mov eax, dword [esp + 0x14]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
and ebp, 0xff
lea esi, [esp + edx + 0x18]
mov bl, byte [eax + 0x384]
mov dl, byte [esi]
mov edi, edx
and edi, 0xff
add ebx, edi
add ebx, ebp
and ebx, 0x800000ff
jns 0x40655a
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x10], bl
mov ebp, dword [esp + 0x10]
mov edi, ebp
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x18]
lea edi, [esp + edi + 0x18]
mov byte [esi], bl
mov esi, 0x57
mov byte [edi], dl
cdq
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x4064eb
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40659d
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4065ad
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x4065bd
movsx eax, cx
mov dl, byte [esp + eax + 0x18]
xor ebx, ebx
lea esi, [esp + eax + 0x18]
mov eax, dword [esp + 0x14]
and eax, 0xff
mov ebp, edx
and ebp, 0xff
mov bl, byte [eax + 0x384]
add edi, ebx
add ebp, edi
mov ebx, ebp
and ebx, 0x800000ff
jns 0x406602
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x10], bl
mov edi, dword [esp + 0x10]
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x18]
mov byte [esi], bl
mov byte [esp + edi + 0x18], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x406597
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
movsx ecx, ax
mov byte [esp + ecx + 0x18], al
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40664f
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40665f
inc eax
cmp ax, 0x100
jl 0x406642
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406676
mov byte [esp + 0x10], bl
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
mov byte [esp + 0x14], bl
jmp 0x406698
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40669e
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4066ae
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x4066be
mov eax, dword [esp + 0x14]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
and ebp, 0xff
lea esi, [esp + edx + 0x18]
mov bl, byte [eax + 0x384]
mov dl, byte [esi]
mov edi, edx
and edi, 0xff
add ebx, edi
add ebx, ebp
and ebx, 0x800000ff
jns 0x406705
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x10], bl
mov ebp, dword [esp + 0x10]
mov edi, ebp
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x18]
lea edi, [esp + edi + 0x18]
mov byte [esi], bl
mov esi, 0x57
mov byte [edi], dl
cdq
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x406696
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406748
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406758
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406768
movsx eax, cx
mov dl, byte [esp + eax + 0x18]
xor ebx, ebx
lea esi, [esp + eax + 0x18]
mov eax, dword [esp + 0x14]
and eax, 0xff
mov ebp, edx
and ebp, 0xff
mov bl, byte [eax + 0x384]
add edi, ebx
add ebp, edi
mov ebx, ebp
and ebx, 0x800000ff
jns 0x4067ad
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x10], bl
mov edi, dword [esp + 0x10]
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x18]
mov byte [esi], bl
mov byte [esp + edi + 0x18], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x406742
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
xor eax, eax
movsx edx, ax
mov byte [esp + edx + 0x18], al
xor eax, eax
lea edx, [esp + 0x18]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x4067f5
xor eax, eax
lea edx, [esp + 0x18]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x406805
inc eax
cmp ax, 0x100
jl 0x4067e8
xor eax, eax
lea edx, [esp + 0x18]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40681c
mov byte [esp + 0x10], cl
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x1c], cl
mov byte [esp + 0x1d], cl
mov byte [esp + 0x14], cl
jmp 0x40683e
xor ecx, ecx
xor eax, eax
lea edx, [esp + 0x18]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x406844
xor eax, eax
lea edx, [esp + 0x18]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x406854
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406862
movsx eax, cx
mov dl, byte [esp + eax + 0x18]
xor ebx, ebx
lea esi, [esp + eax + 0x18]
mov eax, dword [esp + 0x14]
and eax, 0xff
mov edi, edx
and edi, 0xff
and ebp, 0xff
mov bl, byte [eax + 0x384]
add ebx, edi
add ebx, ebp
and ebx, 0x800000ff
jns 0x4068ab
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x10], bl
mov ebp, dword [esp + 0x10]
mov edi, ebp
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x18]
lea edi, [esp + edi + 0x18]
mov byte [esi], bl
mov esi, 0x57
mov byte [edi], dl
cdq
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x40683c
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4068ee
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4068fe
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40690e
mov eax, dword [esp + 0x14]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
lea esi, [esp + edx + 0x18]
mov bl, byte [eax + 0x384]
mov dl, byte [esi]
add edi, ebx
mov ebp, edx
and ebp, 0xff
add ebp, edi
mov ebx, ebp
and ebx, 0x800000ff
jns 0x406951
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x10], bl
mov edi, dword [esp + 0x10]
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x18]
mov byte [esi], bl
mov byte [esp + edi + 0x18], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x4068e8
xor ebx, ebx
lea ecx, [esp + 0x10]
mov ebp, 0x30
mov esi, 0x20
call fcn.00417cf0
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push edi
push esi
push ebp
mov dword [esp + 0x34], ebx
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 0x18
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 8
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 4
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov ebp, 0x20
push edi
push ebp
push ebp
lea ecx, [esp + 0x1c]
mov esi, ebp
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 0x18
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 8
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 4
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 0x20
mov ebp, 0x10
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 0x18
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 8
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
mov esi, 4
push edi
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.00417d30
test eax, eax
jne 0x406ab7
xor esi, esi
cmp esi, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
je 0x406afd
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push edi
push esi
push ebp
lea ecx, [esp + 0x24]
call fcn.00417da0
test eax, eax
je 0x406afd
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
mov dword [edx], ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
mov dword [esp + 0x28], 0xffffffff
call fcn.00417d20
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 0xc