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

Disassembly:
sub esp, 0x280
push ebx
push esi
push edi
lea eax, [esp + 0x1c]
mov edi, ecx
xor ebx, ebx
test eax, eax
mov dword [esp + 0x1c], edi
jne 0x40fd57
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 + 0xc], al
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f877
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f887
inc eax
cmp ax, 0x100
jl 0x40f86a
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f89e
mov byte [esp + 0x14], bl
push ebp
mov ebp, dword [esp + 0x18]
mov byte [esp + 0x14], bl
mov byte [esp + 0x15], bl
mov byte [esp + 0x1c], bl
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f8c3
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f8d3
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40f8e3
mov eax, dword [esp + 0x1c]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
and ebp, 0xff
lea esi, [esp + edx + 0x10]
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 0x40f92a
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x18], bl
mov ebp, dword [esp + 0x18]
mov edi, ebp
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x10]
lea edi, [esp + edi + 0x10]
mov byte [esi], bl
mov esi, 0x57
mov byte [edi], dl
cdq
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x1c], dl
jl 0x40f8bd
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f96d
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40f97d
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40f98d
movsx eax, cx
mov dl, byte [esp + eax + 0x10]
xor ebx, ebx
lea esi, [esp + eax + 0x10]
mov eax, dword [esp + 0x1c]
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 0x40f9d2
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x18], bl
mov edi, dword [esp + 0x18]
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x10]
mov byte [esi], bl
mov byte [esp + edi + 0x10], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x1c], dl
jl 0x40f967
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 + 0x10], al
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fa1f
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fa2f
inc eax
cmp ax, 0x100
jl 0x40fa12
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fa46
mov byte [esp + 0x18], bl
mov byte [esp + 0x14], bl
mov ebp, dword [esp + 0x18]
mov byte [esp + 0x15], bl
mov byte [esp + 0x1c], bl
jmp 0x40fa68
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fa6e
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fa7e
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40fa8e
mov eax, dword [esp + 0x1c]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
and ebp, 0xff
lea esi, [esp + edx + 0x10]
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 0x40fad5
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x18], bl
mov ebp, dword [esp + 0x18]
mov edi, ebp
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x10]
lea edi, [esp + edi + 0x10]
mov byte [esi], bl
mov esi, 0x57
mov byte [edi], dl
cdq
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x1c], dl
jl 0x40fa66
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fb18
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fb28
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40fb38
movsx eax, cx
mov dl, byte [esp + eax + 0x10]
xor ebx, ebx
lea esi, [esp + eax + 0x10]
mov eax, dword [esp + 0x1c]
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 0x40fb7d
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x18], bl
mov edi, dword [esp + 0x18]
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x10]
mov byte [esi], bl
mov byte [esp + edi + 0x10], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x1c], dl
jl 0x40fb12
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
xor eax, eax
movsx edx, ax
mov byte [esp + edx + 0x10], al
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40fbc5
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40fbd5
inc eax
cmp ax, 0x100
jl 0x40fbb8
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40fbec
mov byte [esp + 0x18], cl
mov byte [esp + 0x14], cl
mov ebp, dword [esp + 0x18]
mov byte [esp + 0x15], cl
mov byte [esp + 0x1c], cl
jmp 0x40fc0e
xor ecx, ecx
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40fc14
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40fc24
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40fc32
movsx eax, cx
mov dl, byte [esp + eax + 0x10]
xor ebx, ebx
lea esi, [esp + eax + 0x10]
mov eax, dword [esp + 0x1c]
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 0x40fc7b
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x18], bl
mov ebp, dword [esp + 0x18]
mov edi, ebp
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x10]
lea edi, [esp + edi + 0x10]
mov byte [esi], bl
mov esi, 0x57
mov byte [edi], dl
cdq
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x1c], dl
jl 0x40fc0c
mov edi, ebp
and edi, 0xff
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fcbe
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40fcce
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40fcde
mov eax, dword [esp + 0x1c]
xor ebx, ebx
movsx edx, cx
and eax, 0xff
lea esi, [esp + edx + 0x10]
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 0x40fd21
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x18], bl
mov edi, dword [esp + 0x18]
and edi, 0xff
inc eax
mov bl, byte [esp + edi + 0x10]
mov byte [esi], bl
mov byte [esp + edi + 0x10], dl
cdq
mov esi, 0x57
idiv esi
inc ecx
cmp cx, 0x100
mov byte [esp + 0x1c], dl
jl 0x40fcb8
mov edi, dword [esp + 0x20]
pop ebp
mov esi, dword [esp + 0x290]
mov eax, dword [0x4353d0]
push esi
call dword [eax + 0x1f0]
add esp, 4
test eax, eax
je 0x40fec8
mov edx, dword [0x4353d0]
push 0x104
lea ecx, [esp + 0x24]
push 0
push ecx
call dword [edx + 0x21c]
mov ecx, dword [0x4353d0]
lea eax, [esp + 0x2c]
push esi
push eax
call dword [ecx + 0x1e8]
mov eax, dword [0x4353d0]
lea edx, [esp + 0x34]
push edx
call dword [eax + 0x210]
mov edx, dword [0x4353d0]
add esp, 0x18
lea ecx, [esp + 0x188]
push 0x104
push ecx
push 0
call dword [edx + 0x74]
mov ecx, dword [0x4353d0]
lea eax, [esp + 0x188]
push eax
call dword [ecx + 0x210]
mov ecx, dword [0x4353d0]
lea edx, [esp + 0x18c]
lea eax, [esp + 0x24]
push edx
push eax
call dword [ecx + 0x1e0]
add esp, 0xc
test eax, eax
je 0x40fec8
cmp byte [esp + 0x21], 0x3a
jne 0x40fec8
cmp byte [esp + 0x22], 0x5c
jne 0x40fec8
mov eax, dword [0x4353d0]
lea edx, [esp + 0x20]
push edx
call dword [eax + 0x1f0]
add esp, 4
lea ecx, [esp + 0x20]
lea edx, [esp + 0x124]
mov esi, eax
push 0
push 0x65
push 0x78
push 0x65
sub ecx, 4
push 0x2e
push edx
add esi, ecx
call fcn.00408c90
mov ecx, dword [0x4353d0]
lea eax, [esp + 0x13c]
push eax
push esi
call dword [ecx + 0x1e0]
add esp, 0x20
test eax, eax
jne 0x40fec8
lea edx, [esp + 0x188]
lea eax, [esp + 0x20]
push edx
push eax
mov ecx, edi
call fcn.004104f0
test eax, eax
je 0x40fec8
lea ecx, [esp + 0x188]
lea edx, [esp + 0x20]
push ecx
push edx
mov ecx, edi
call fcn.00410ff0
test eax, eax
je 0x40fec8
lea eax, [esp + 0x20]
mov ecx, edi
push eax
call fcn.00410a90
test eax, eax
je 0x40fec8
cmp eax, 0xa00000
ja 0x40fec8
cmp eax, 0x2800
jb 0x40fec8
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x280
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x280
ret 4