Function at 0x406b30
Capabilities:
Encrypt data using rc4 ksa
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42d978
push eax
mov dword fs:[0], esp
sub esp, 0x10
lea eax, [esp + 0x34]
push ebx
push ebp
push esi
push edi
test eax, eax
jne 0x407053
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 + 0x18], al
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406b72
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406b82
inc eax
cmp ax, 0x100
jl 0x406b65
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406b99
mov byte [esp + 0x10], 0
mov byte [esp + 0x1c], 0
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x1d], 0
mov byte [esp + 0x14], 0
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406bc1
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406bd1
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406be1
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 0x406c28
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 0x406bbb
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 0x406c6b
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406c7b
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406c8b
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 0x406cd0
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 0x406c65
push 0
push 0
push 0
push 0
push 0
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 0x406d20
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406d30
inc eax
cmp ax, 0x100
jl 0x406d13
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406d47
mov byte [esp + 0x10], 0
mov byte [esp + 0x1c], 0
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x1d], 0
mov byte [esp + 0x14], 0
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406d6f
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406d7f
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406d8f
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]
add ebx, ebp
mov edi, edx
and edi, 0xff
add ebx, edi
and ebx, 0x800000ff
jns 0x406dd6
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 0x406d69
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 0x406e19
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406e29
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406e39
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 0x406e7e
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 0x406e13
call dword [sym.imp.KERNEL32.dll_GetLastError]
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 0x406ec4
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406ed4
inc eax
cmp ax, 0x100
jl 0x406eb7
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406eeb
mov byte [esp + 0x10], 0
mov byte [esp + 0x1c], 0
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x1d], 0
mov byte [esp + 0x14], 0
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406f13
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406f23
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406f33
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]
add ebx, ebp
mov edi, edx
and edi, 0xff
add ebx, edi
and ebx, 0x800000ff
jns 0x406f7a
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 0x406f0d
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 0x406fbd
xor eax, eax
lea ecx, [esp + 0x18]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x406fcd
xor ecx, ecx
lea eax, [esp + 0x18]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x406fdd
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 0x407022
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 0x406fb7
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
lea eax, [esi + edi - 0x6e]
mov dword [esp + 0x34], eax
mov eax, dword [eax]
sub edi, eax
lea ebx, [edi + ecx]
push ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [0x4353d0]
mov ebp, eax
push ebx
push 0
push ebp
call dword [edx + 0x21c]
lea ecx, [edi - 0x6e]
mov edi, ebp
mov eax, ecx
add esp, 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x34]
lea edi, [ebx + ebp - 0x6e]
mov ecx, 0x1b
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, dword [0x4353d0]
call dword [ecx + 0x8c]
mov dword [ebx + ebp - 0x66], eax
add eax, 0xfffff843
mov dword [ebp + 0xffc], eax
mov eax, dword [ebx + ebp - 0x6a]
test eax, eax
jne 0x4070fd
lea ecx, [esp + 0x34]
call fcn.00417a50
push ebx
push ebp
lea ecx, [esp + 0x3c]
mov dword [esp + 0x30], 0
call fcn.00417ac0
or edi, 0xffffffff
mov dword [ebx + ebp - 0x6a], eax
mov dword [esp + 0x28], edi
lea ecx, [esp + 0x34]
jmp 0x407129
lea ecx, [esp + 0x34]
call fcn.00417a50
mov edx, dword [ebx + ebp - 0x6a]
lea ecx, [esp + 0x34]
push edx
push ebx
push ebp
mov dword [esp + 0x34], 1
call fcn.00417b90
or edi, 0xffffffff
lea ecx, [esp + 0x34]
mov dword [esp + 0x28], edi
call fcn.00417a90
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
test esi, esi
mov dword [ebx + ebp - 0x6e], eax
je 0x40716c
lea ecx, [esp + 0x44]
call fcn.00417cf0
mov ecx, dword [esp + 0x3c]
push esi
push ecx
push ebp
lea ecx, [esp + 0x50]
mov dword [esp + 0x34], 2
call fcn.00417e10
lea ecx, [esp + 0x44]
mov dword [esp + 0x28], edi
call fcn.00417d20
mov edx, dword [esp + 0x30]
mov eax, dword [0x4353d0]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edx
call dword [eax + 0x50]
mov esi, eax
cmp esi, edi
je 0x4071ad
mov edx, dword [0x4353d0]
lea ecx, [esp + 0x38]
push 0
push ecx
push ebx
push ebp
push esi
call dword [edx + 0x78]
mov eax, dword [0x4353d0]
push esi
call dword [eax + 0x44]
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x24]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x18