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

Disassembly:
sub esp, 0x14
lea eax, [esp + 8]
mov dword [esp + 8], ecx
test eax, eax
mov dword [ecx], 0x42f09c
jne 0x40ec0f
push ebx
push ebp
push esi
xor ebx, ebx
push edi
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 + 0x1c], al
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e729
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e739
inc eax
cmp ax, 0x100
jl 0x40e71c
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e750
mov byte [esp + 0x10], bl
mov byte [esp + 0x20], bl
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x21], bl
mov byte [esp + 0x14], bl
jmp 0x40e772
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e778
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e788
xor ecx, ecx
lea eax, [esp + 0x1c]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40e798
mov eax, dword [esp + 0x14]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
and ebp, 0xff
lea esi, [esp + edx + 0x1c]
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 0x40e7df
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 + 0x1c]
lea edi, [esp + edi + 0x1c]
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 0x40e770
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e822
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e832
xor ecx, ecx
lea eax, [esp + 0x1c]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40e842
movsx eax, cx
mov dl, byte [esp + eax + 0x1c]
xor ebx, ebx
lea esi, [esp + eax + 0x1c]
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 0x40e887
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 + 0x1c]
mov byte [esi], bl
mov byte [esp + edi + 0x1c], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x40e81c
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 + 0x1c], al
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e8d4
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e8e4
inc eax
cmp ax, 0x100
jl 0x40e8c7
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e8fb
mov byte [esp + 0x10], bl
mov byte [esp + 0x20], bl
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x21], bl
mov byte [esp + 0x14], bl
jmp 0x40e91d
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e923
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e933
xor ecx, ecx
lea eax, [esp + 0x1c]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40e943
mov eax, dword [esp + 0x14]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
and ebp, 0xff
lea esi, [esp + edx + 0x1c]
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 0x40e98a
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 + 0x1c]
lea edi, [esp + edi + 0x1c]
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 0x40e91b
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e9cd
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40e9dd
xor ecx, ecx
lea eax, [esp + 0x1c]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40e9ed
movsx eax, cx
mov dl, byte [esp + eax + 0x1c]
xor ebx, ebx
lea esi, [esp + eax + 0x1c]
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 0x40ea32
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 + 0x1c]
mov byte [esi], bl
mov byte [esp + edi + 0x1c], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x40e9c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
xor eax, eax
movsx edx, ax
mov byte [esp + edx + 0x1c], al
xor eax, eax
lea edx, [esp + 0x1c]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40ea7a
xor eax, eax
lea edx, [esp + 0x1c]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40ea8a
inc eax
cmp ax, 0x100
jl 0x40ea6d
xor eax, eax
lea edx, [esp + 0x1c]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40eaa1
mov byte [esp + 0x10], cl
mov byte [esp + 0x20], cl
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x21], cl
mov byte [esp + 0x14], cl
jmp 0x40eac3
xor ecx, ecx
xor eax, eax
lea edx, [esp + 0x1c]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40eac9
xor eax, eax
lea edx, [esp + 0x1c]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40ead9
lea eax, [esp + 0x1c]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40eae7
movsx eax, cx
mov dl, byte [esp + eax + 0x1c]
xor ebx, ebx
lea esi, [esp + eax + 0x1c]
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 0x40eb30
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 + 0x1c]
lea edi, [esp + edi + 0x1c]
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 0x40eac1
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40eb73
xor eax, eax
lea ecx, [esp + 0x1c]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40eb83
xor ecx, ecx
lea eax, [esp + 0x1c]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40eb93
mov eax, dword [esp + 0x14]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
lea esi, [esp + edx + 0x1c]
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 0x40ebd6
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 + 0x1c]
mov byte [esi], bl
mov byte [esp + edi + 0x1c], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x14], dl
jl 0x40eb6d
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add ecx, 4
call fcn.004122d0
add esp, 0x14
ret