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

Disassembly:
sub esp, 0x6b8
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 0x40d967
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 0x40d487
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d497
inc eax
cmp ax, 0x100
jl 0x40d47a
xor eax, eax
lea ecx, [esp + 0xc]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d4ae
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 0x40d4d3
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d4e3
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40d4f3
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 0x40d53a
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 0x40d4cd
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 0x40d57d
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d58d
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40d59d
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 0x40d5e2
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 0x40d577
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 0x40d62f
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d63f
inc eax
cmp ax, 0x100
jl 0x40d622
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d656
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 0x40d678
xor ebx, ebx
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d67e
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d68e
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40d69e
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 0x40d6e5
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 0x40d676
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 0x40d728
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d738
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40d748
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 0x40d78d
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 0x40d722
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 0x40d7d5
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40d7e5
inc eax
cmp ax, 0x100
jl 0x40d7c8
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40d7fc
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 0x40d81e
xor ecx, ecx
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40d824
xor eax, eax
lea edx, [esp + 0x10]
mov byte [edx], al
inc eax
inc edx
cmp ax, 0x100
jl 0x40d834
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40d842
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 0x40d88b
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 0x40d81c
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 0x40d8ce
xor eax, eax
lea ecx, [esp + 0x10]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x40d8de
xor ecx, ecx
lea eax, [esp + 0x10]
mov byte [eax], cl
inc ecx
inc eax
cmp cx, 0x100
jl 0x40d8ee
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 0x40d931
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 0x40d8c8
mov edi, dword [esp + 0x20]
pop ebp
mov ecx, dword [0x4353d0]
push 0x104
lea eax, [esp + 0x24]
push 0
push eax
call dword [ecx + 0x21c]
mov eax, dword [0x4353d0]
add esp, 0xc
lea edx, [esp + 0x20]
push 0x104
push edx
push 0
call dword [eax + 0x74]
mov eax, dword [0x4353d0]
push 1
push 0
lea ecx, [esp + 0x28]
push 0x2e
push ecx
lea esi, [eax + 0x21c]
call dword [eax + 0x1ec]
add esp, 8
push eax
call dword [esi]
add esp, 0xc
lea edx, [esp + 0x28c]
push 0
push 0x65
push 0x78
push 0x65
push 0x2e
push 0x73
push 0x25
push edx
call fcn.00408c90
add esp, 0x20
lea eax, [esp + 0x2f0]
push 0
push 0x6b
push 0x61
push 0x62
push 0x2e
push 0x73
push 0x25
push eax
call fcn.00408c90
add esp, 0x20
lea ecx, [esp + 0x228]
push 0
push 0x70
push 0x6d
push 0x65
push 0x74
push 0x2e
push 0x73
push 0x25
push ecx
call fcn.00408c90
lea edx, [esp + 0x44]
lea eax, [esp + 0x2b0]
push edx
mov edx, dword [0x4353d0]
lea ecx, [esp + 0x14c]
push eax
push ecx
call dword [edx + 0x1dc]
mov edx, dword [0x4353d0]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x3e8]
push eax
push ecx
call dword [edx + 0x1e8]
lea eax, [esp + 0x58]
lea ecx, [esp + 0x328]
push eax
mov eax, dword [0x4353d0]
lea edx, [esp + 0x4f8]
push ecx
push edx
call dword [eax + 0x1dc]
add esp, 0x44
lea ecx, [esp + 0x20]
lea edx, [esp + 0x228]
push ecx
mov ecx, dword [0x4353d0]
lea eax, [esp + 0x5c4]
push edx
push eax
call dword [ecx + 0x1dc]
add esp, 0xc
lea edx, [esp + 0x4bc]
lea eax, [esp + 0x124]
mov ecx, edi
push edx
push eax
call fcn.0040dbb0
test eax, eax
je 0x40db9e
lea ecx, [esp + 0x124]
lea edx, [esp + 0x3b8]
push ecx
push edx
mov ecx, edi
call fcn.0040dbb0
test eax, eax
je 0x40db9e
push 0
push 0x6e
push 0x65
push 0x70
lea eax, [esp + 0x364]
push 0x6f
push eax
call fcn.00408c90
mov ecx, dword [esp + 0x6e4]
mov edx, dword [esp + 0x6e0]
add esp, 0x18
lea eax, [esp + 0x124]
push ecx
push 0
push edx
mov edx, dword [0x4353d0]
lea ecx, [esp + 0x360]
push eax
push ecx
push 0
call dword [edx + 0x118]
mov eax, dword [0x4353d0]
push 0x64
call dword [eax + 0x3c]
lea ecx, [esp + 0x3b8]
lea edx, [esp + 0x124]
push ecx
push edx
mov ecx, edi
call fcn.0040dbb0
test eax, eax
je 0x40db9e
lea eax, [esp + 0x124]
lea ecx, [esp + 0x4bc]
push eax
push ecx
mov ecx, edi
call fcn.0040dbb0
test eax, eax
je 0x40db9e
mov eax, dword [0x4353d0]
push 0
push 0x80
push 2
push 0
push 1
lea edx, [esp + 0x5d4]
push 0x40000000
push edx
call dword [eax + 0x50]
cmp eax, 0xffffffff
je 0x40db9e
mov ecx, dword [0x4353d0]
push eax
call dword [ecx + 0x44]
mov eax, dword [0x4353d0]
lea edx, [esp + 0x5c0]
push edx
call dword [eax + 0x40]
pop edi
pop esi
pop ebx
add esp, 0x6b8
ret 8