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

Disassembly:
sub esp, 0x118
push ebx
push esi
lea eax, [esp + 0x18]
mov esi, ecx
test eax, eax
push edi
mov dword [esp + 0x1c], esi
jne 0x4063d9
push eax
push eax
push eax
push eax
push eax
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 0x405ef5
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x405f05
inc eax
cmp ax, 0x100
jl 0x405ee8
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x405f1c
mov byte [esp + 0x14], 0
push ebp
mov ebp, dword [esp + 0x18]
mov byte [esp + 0x14], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x1c], 0
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x405f45
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x405f55
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x405f65
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 0x405fac
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 0x405f3f
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 0x405fef
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x405fff
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40600f
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 0x406054
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 0x405fe9
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 0x4060a1
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4060b1
inc eax
cmp ax, 0x100
jl 0x406094
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4060c8
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 0x4060ea
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4060f0
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406100
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406110
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 0x406157
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 0x4060e8
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 0x40619a
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x4061aa
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x4061ba
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 0x4061ff
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 0x406194
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 0x406247
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x406257
inc eax
cmp ax, 0x100
jl 0x40623a
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40626e
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 0x406290
xor ecx, ecx
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x406296
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x4062a6
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x4062b4
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 0x4062fd
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 0x40628e
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 0x406340
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406350
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406360
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 0x4063a3
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 0x40633a
mov esi, dword [esp + 0x20]
pop ebp
mov ecx, dword [0x4353d0]
lea edi, [esi + 4]
lea eax, [esp + 0x20]
push edi
push eax
call dword [ecx + 0x1e8]
mov eax, dword [0x4353d0]
add esp, 8
lea edx, [esp + 0x20]
push 1
push 0
push 0x2e
push edx
lea ebx, [eax + 0x21c]
call dword [eax + 0x1ec]
add esp, 8
push eax
call dword [ebx]
add esp, 0xc
lea eax, [esp + 0x20]
mov ecx, esi
push eax
call fcn.004071d0
test eax, eax
jne 0x406443
lea ecx, [esp + 0x20]
push ecx
push edi
mov ecx, esi
call fcn.0040dbb0
test eax, eax
je 0x40644a
lea edx, [esp + 0x20]
mov ecx, esi
push edx
call fcn.00407730
mov ecx, esi
call fcn.00405920
pop edi
pop esi
pop ebx
add esp, 0x118
ret