Function at 0x405591
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
push ebx
push esi
push edi
mov dword [ebp - 0x3c], ecx
lea edi, [ebp - 0x64]
push 5
pop ecx
mov esi, str.argument_out_of_domain
mov dword [ebp - 0x30], 0x8aa9ba50
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [ebp - 0x2c], 0xcdf1bdd0
mov dword [ebp - 0x28], 0xde41a278
mov eax, ecx
mov dword [ebp - 0x24], 0x352fbe3a
movsw word es:[edi], word [esi]
mov dword [ebp - 0x20], 0x4ed75730
mov dword [ebp - 0x1c], 0x81c3032a
mov dword [ebp - 0x18], 0xbf5a07cf
movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x14], 0xfac546ba
mov edi, ecx
mov dword [ebp - 0x10], 0xd157cfbf
mov dword [ebp - 0xc], 0x8f3d2e3c
mov dword [ebp - 8], 0x561304da
mov byte [ebp + eax - 0x170], al
inc eax
cmp eax, 0x100
jb 0x405603
mov esi, ecx
xor edx, edx
mov bl, byte [ebp + esi - 0x170]
push 0x16
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0x64]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x170]
mov byte [ebp + esi - 0x170], al
inc esi
mov byte [ebp + edi - 0x170], bl
cmp esi, 0x100
jb 0x405614
xor eax, eax
mov ebx, eax
mov edi, eax
mov esi, eax
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [ebp + edi - 0x170]
movzx edx, cl
lea eax, [edx + ebx]
movzx ebx, al
mov al, byte [ebp + ebx - 0x170]
mov byte [ebp + edi - 0x170], al
mov byte [ebp + ebx - 0x170], cl
movzx eax, byte [ebp + edi - 0x170]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x170]
xor al, byte [ebp + esi - 0x30]
mov byte [ebp + esi - 0x1a0], al
inc esi
cmp esi, 0x2c
jb 0x405659
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0x208
push eax
push dword [ebp - 0x3c]
xor ecx, ecx
lea edx, [ebp - 0x1a0]
xor ebx, ebx
inc ecx
push 2
mov byte [ebp - 0x174], bl
call fcn.0040a2e6
call eax
test eax, eax
jne 0x40589b
mov esi, str.imageSize
mov dword [ebp - 0x1c], 0xb8079d03
lea edi, [ebp - 0x70]
mov dword [ebp - 0x18], 0x2a21ab4d
push 0x53
pop eax
movsd dword es:[edi], dword [esi]
mov byte [ebp - 0xa], al
mov eax, ebx
mov dword [ebp - 0x14], 0x1c01c4b4
mov dword [ebp - 0x10], 0xbf6d89d
movsd dword es:[edi], dword [esi]
mov word [ebp - 0xc], 0xf599
mov dword [ebp - 9], 0x21a82d2f
mov byte [ebp - 5], 0xef
movsw word es:[edi], word [esi]
mov esi, ebx
mov byte [ebp + eax - 0x170], al
inc eax
cmp eax, 0x100
jb 0x40571c
mov ecx, ebx
mov ebx, dword [0x4340e4]
mov dword [ebp - 0x38], ecx
mov al, byte [ebp + ecx - 0x170]
xor edx, edx
mov byte [ebp - 1], al
mov eax, ecx
push 9
pop ecx
div ecx
movzx ecx, byte [ebp - 1]
push 0x42d200
movzx eax, byte [ebp + edx - 0x70]
add eax, esi
add ecx, eax
movzx eax, cl
push ecx
mov ecx, ebx
mov dword [ebp - 0x48], eax
call fcn.00404591
pop ecx
pop ecx
push 5
pop ecx
mov esi, 0x42cf00
lea edi, [ebp - 0x64]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
push 0x53
pop ecx
mov edx, eax
movsw word es:[edi], word [esi]
mov dword [ebp - 0x34], edx
cmp cx, word [ebp - 0x64]
jne 0x4057dd
xor esi, esi
test cx, cx
je 0x4057b5
cmp word [ebp + eax - 0x64], si
je 0x4057b5
call fcn.0040488c
mov edx, dword [ebp - 0x34]
inc edx
mov dword [ebp - 0x34], edx
lea eax, [edx + edx]
movzx ecx, word [eax + 0x42d200]
cmp cx, word [ebp + eax - 0x64]
je 0x40578c
mov eax, dword [ebp - 0x44]
cmp eax, edx
jae 0x4057dd
cmp eax, 0xc4a
jne 0x4057c9
add ebx, 0xc535f9c
xor ebx, 0x7464dea1
inc eax
cmp eax, edx
jb 0x4057bc
mov dword [0x4340e4], ebx
mov dword [ebp - 0x44], eax
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x38]
mov al, byte [ebp + esi - 0x170]
mov byte [ebp + ecx - 0x170], al
inc ecx
mov al, byte [ebp - 1]
mov byte [ebp + esi - 0x170], al
mov dword [ebp - 0x38], ecx
cmp ecx, 0x100
jb 0x405736
xor eax, eax
mov ebx, eax
mov edi, eax
mov esi, eax
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [ebp + edi - 0x170]
movzx edx, cl
lea eax, [ebx + edx]
movzx ebx, al
mov al, byte [ebp + ebx - 0x170]
mov byte [ebp + edi - 0x170], al
mov byte [ebp + ebx - 0x170], cl
movzx eax, byte [ebp + edi - 0x170]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x170]
xor al, byte [ebp + esi - 0x1c]
mov byte [ebp + esi - 0x64], al
inc esi
cmp esi, 0x18
jb 0x405813
xor ebx, ebx
lea ecx, [ebp - 0x64]
mov byte [ebp - 0x4c], bl
call fcn.0040b628
mov esi, eax
mov ecx, esi
call fcn.0040b8f4
add eax, eax
push eax
push esi
push dword [ebp - 0x3c]
call fcn.0040b543
mov ecx, esi
call fcn.0040b8f4
push eax
push ebx
push esi
call fcn.0040b587
add esp, 0x18
mov ecx, esi
call fcn.0040a2d2
pop edi
pop esi
pop ebx
leave
ret