Function at 0x40d670
Capabilities:
Encrypt data using rc4 prga
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x8c
mov ebp, dword [esp + 0xa0]
mov dword [esp + 0x5c], ecx
add ebp, dword [ecx + 0x60]
mov dword [esp + 0x60], 0xdbdcda0f
mov dword [esp + 0x64], 0x1ed6dfe9
mov dword [esp + 0x68], 0xe2d6c8f4
mov dword [esp + 0x6c], 0x2f1b250a
mov dword [esp + 0x70], 0x2719182c
mov dword [esp + 0x74], 0x27201821
mov dword [esp + 0x78], 0x24eb39e3
mov dword [esp + 0x7c], 0xc0f2b12
mov dword [esp + 0x80], 0xd2d0d43c
mov word [esp + 0x84], 0xadd2
mov dword [esp + 0x86], 0
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
cmp eax, 0x29
ja 0x40d72b
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0xc]
movzx eax, byte [esp + eax + 0x60]
push dword [esp + 0xc]
push eax
call fcn.0040e340
add esp, 8
mov ecx, dword [esp + 0xc]
mov byte [esp + ecx + 0x60], al
inc dword [esp + 0xc]
mov eax, dword [esp + 0xc]
cmp eax, 0x2a
jb 0x40d700
mov dword [esp + 4], 0x57405c26
mov word [esp + 8], 0
mov byte [esp + 0xa], 0
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
cmp eax, 6
ja 0x40d77b
mov eax, dword [esp + 0xc]
movzx eax, byte [esp + eax + 4]
push dword [esp + 0xc]
push eax
call fcn.0040e2d0
add esp, 8
mov ecx, dword [esp + 0xc]
mov byte [esp + ecx + 4], al
inc dword [esp + 0xc]
mov eax, dword [esp + 0xc]
cmp eax, 7
jb 0x40d750
mov dword [esp + 0xc], 0xe6e02c2d
mov dword [esp + 0x10], 0xe2e2303c
mov dword [esp + 0x14], 0xeffae03d
mov dword [esp + 0x18], 0xeae7eee3
mov dword [esp + 0x1c], 0x22f7e3e2
mov dword [esp + 0x20], 0xf8d51f19
mov dword [esp + 0x24], 0xf5ffedf6
mov dword [esp + 0x28], 0xf6da30e8
mov dword [esp + 0x2c], 0xd0cdd1d3
mov dword [esp + 0x30], 0xc8cfd1cd
mov dword [esp + 0x34], 0xcd0a13c6
mov dword [esp + 0x38], 0x2c3dfc3
mov dword [esp + 0x3c], 0xd2c6d0d4
mov dword [esp + 0x40], 0xd6d8150f
mov dword [esp + 0x44], 0x1907dcd5
mov dword [esp + 0x48], 0xdad2d4da
mov dword [esp + 0x4c], 0x25e2fae2
mov dword [esp + 0x50], 0x2923292d
mov dword [esp + 0x54], 0xf62f2429
mov dword [esp + 0x58], 0xcdee
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x4f
ja 0x40d856
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
movzx eax, byte [esp + eax + 0xc]
push dword [esp]
push eax
call fcn.0040e280
add esp, 8
mov ecx, dword [esp]
mov byte [esp + ecx + 0xc], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x50
jb 0x40d830
mov eax, dword [esp + 0xa4]
movzx ecx, byte [esp + 0xc]
mov ebx, ebp
test cl, cl
je 0x40d87b
lea edx, [esp + 0xd]
mov ebx, ebp
nop
nop
mov byte [ebx], cl
inc ebx
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40d870
mov byte [ebx], 0
movzx ecx, byte [eax]
test cl, cl
je 0x40d89b
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [ebx], cl
inc ebx
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x40d890
mov byte [ebx], 0
movzx eax, byte [esp + 4]
test al, al
je 0x40d8bb
lea ecx, [esp + 5]
nop
nop
nop
nop
nop
mov byte [ebx], al
inc ebx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40d8b0
mov edx, dword [esp + 0xa8]
mov byte [ebx], 0
movzx eax, byte [esp + 0x60]
test al, al
je 0x40d8eb
lea ecx, [esp + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [ebx], al
inc ebx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40d8e0
mov byte [ebx], 0
mov esi, dword [esp + 0xac]
mov ecx, esi
shr ecx, 2
mov eax, edx
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, esi
not ecx
or ecx, 0xfffffffc
add ecx, esi
mov edi, esi
lea eax, [ebx + ecx]
inc eax
lea esi, [edx + ecx]
inc esi
mov ecx, edi
shr ecx, 1
and ecx, 1
mov edx, esi
mov edi, eax
xchg esi, edx
rep movsw word es:[edi], word [esi]
xchg esi, edx
mov ecx, dword [esp + 0xac]
test cl, 1
je 0x40d93d
and ecx, 2
movzx edx, byte [esi + ecx]
mov byte [eax + ecx], dl
mov dword [esp + 0xc], 0x2e2f0b0d
mov dword [esp + 0x10], 0x323ee0e6
mov dword [esp + 0x14], 0xe23fecec
mov dword [esp + 0x18], 0xece1e9fc
mov dword [esp + 0x1c], 0xe1e0f4f9
mov dword [esp + 0x20], 0x1d1b24f1
mov word [esp + 0x24], 0x1315
mov byte [esp + 0x26], 0x1a
mov word [esp + 0x27], 0
mov dword [esp + 0x60], 0
mov eax, dword [esp + 0x60]
cmp eax, 0x1c
ja 0x40d9cb
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x60]
movzx eax, byte [esp + eax + 0xc]
push dword [esp + 0x60]
push eax
call fcn.0040e390
add esp, 8
mov ecx, dword [esp + 0x60]
mov byte [esp + ecx + 0xc], al
inc dword [esp + 0x60]
mov eax, dword [esp + 0x60]
cmp eax, 0x1d
jb 0x40d9a0
add ebx, dword [esp + 0xac]
movzx eax, byte [esp + 0xc]
test al, al
je 0x40d9eb
lea ecx, [esp + 0xd]
nop
mov byte [ebx], al
inc ebx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40d9e0
mov byte [ebx], 0
mov eax, ebx
not eax
and eax, ebp
not ebp
and ebp, ebx
sub ebp, eax
mov edx, dword [esp + 0x5c]
mov eax, dword [edx + 0x60]
mov ecx, eax
and ecx, ebp
xor ebp, eax
lea eax, [ecx*2]
add eax, ebp
mov dword [edx + 0x60], eax
add esp, 0x8c
pop esi
pop edi
pop ebx
pop ebp
ret 0x10