Function at 0x408045
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
cmp dword [ebp + 8], 0
je 0x408066
cmp dword [ebp + 0xc], 0
jle 0x408066
cmp dword [ebp + 0x10], 0
je 0x408066
cmp dword [ebp + 0x14], 0
jg 0x40806d
xor al, al
jmp 0x408357
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x110], ecx
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x120], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x118], 0
mov byte [ebp - 0x114], 0
push 0x101
push 0
lea edx, [ebp - 0x10c]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x101
push 0
lea eax, [ebp - 0x224]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x11c], 0
jmp 0x4080ef
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
cmp dword [ebp - 0x11c], 0x100
jae 0x408110
mov edx, dword [ebp - 0x11c]
mov al, byte [ebp - 0x11c]
mov byte [ebp + edx - 0x10c], al
jmp 0x4080e0
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x11c], 0
jmp 0x408135
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
cmp dword [ebp - 0x11c], 0x100
jae 0x408182
mov edx, dword [ebp - 0x120]
cmp edx, dword [ebp + 0x14]
jne 0x408156
mov dword [ebp - 0x120], 0
mov eax, dword [ebp - 0x110]
add eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x11c]
mov dl, byte [eax]
mov byte [ebp + ecx - 0x224], dl
mov eax, dword [ebp - 0x120]
add eax, 1
mov dword [ebp - 0x120], eax
jmp 0x408126
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x11c], 0
jmp 0x4081a7
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
cmp dword [ebp - 0x11c], 0x100
jae 0x40822f
mov edx, dword [ebp - 0x11c]
xor eax, eax
mov al, byte [ebp + edx - 0x10c]
mov ecx, dword [ebp - 0x120]
add ecx, eax
mov edx, dword [ebp - 0x11c]
xor eax, eax
mov al, byte [ebp + edx - 0x224]
add eax, ecx
xor edx, edx
mov ecx, pe_nt_image_headers32
div ecx
mov dword [ebp - 0x120], edx
mov edx, dword [ebp - 0x11c]
mov al, byte [ebp + edx - 0x10c]
mov byte [ebp - 0x114], al
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x120]
mov al, byte [ebp + edx - 0x10c]
mov byte [ebp + ecx - 0x10c], al
mov ecx, dword [ebp - 0x120]
mov dl, byte [ebp - 0x114]
mov byte [ebp + ecx - 0x10c], dl
jmp 0x408198
mov dword [ebp - 0x120], 0
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x118], 0
jmp 0x408260
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp - 0x118]
cmp edx, dword [ebp + 0xc]
jae 0x408355
mov eax, dword [ebp - 0x11c]
add eax, 1
xor edx, edx
mov ecx, pe_nt_image_headers32
div ecx
mov dword [ebp - 0x11c], edx
mov edx, dword [ebp - 0x11c]
xor eax, eax
mov al, byte [ebp + edx - 0x10c]
mov ecx, dword [ebp - 0x120]
add eax, ecx
xor edx, edx
mov ecx, pe_nt_image_headers32
div ecx
mov dword [ebp - 0x120], edx
mov edx, dword [ebp - 0x11c]
mov al, byte [ebp + edx - 0x10c]
mov byte [ebp - 0x114], al
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x120]
mov al, byte [ebp + edx - 0x10c]
mov byte [ebp + ecx - 0x10c], al
mov ecx, dword [ebp - 0x120]
mov dl, byte [ebp - 0x114]
mov byte [ebp + ecx - 0x10c], dl
mov eax, dword [ebp - 0x11c]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x10c]
mov eax, ecx
mov edx, dword [ebp - 0x120]
xor ecx, ecx
mov cl, byte [ebp + edx - 0x10c]
add eax, ecx
xor edx, edx
mov ecx, pe_nt_image_headers32
div ecx
mov dword [ebp - 8], edx
mov edx, dword [ebp - 8]
mov al, byte [ebp + edx - 0x10c]
mov byte [ebp - 0x228], al
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x118]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp - 0x228]
and eax, 0xff
xor edx, eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x118]
mov byte [ecx], dl
jmp 0x408251
mov al, 1
mov esp, ebp
pop ebp
ret