Function at 0x4f993c
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0x1c]
push esi
cmp dword [ebx + 0xe8], 0
mov esi, dword [esp + 0x1c]
push edi
je 0x4f9961
mov eax, dword [ebx + 0x84]
sub eax, esi
dec eax
jmp 0x4f9963
mov eax, esi
mov ecx, dword [ebx + 0xcc]
mov edi, ecx
imul edi, eax
mov edx, ecx
mov eax, dword [ebx + 0xd4]
neg edx
imul eax, dword [esp + 0x1c]
add edi, eax
add edi, dword [ebx + 0xc8]
cmp dword [ebx + 0xe8], 0
cmove edx, ecx
cmp dword [ebx + 0xe0], 0
mov dword [esp + 0x18], edx
jne 0x4f9d4f
cmp dword [ebx + 0xe4], 0
jne 0x4f9d4f
mov eax, dword [ebx + 0xd8]
test al, 2
je 0x4f99e5
test ebp, ebp
je 0x4f9d6c
mov al, byte [ebx + 0xf0]
xor byte [edi + 2], al
mov al, byte [ebx + 0xf4]
xor byte [edi + 1], al
mov al, byte [ebx + 0xf8]
xor byte [edi], al
add edi, edx
sub ebp, 1
jne 0x4f99bf
jmp 0x4f9d6c
test eax, 0x100
je 0x4f9a23
test ebp, ebp
je 0x4f9d6c
mov al, byte [ebx + 0xf0]
mov byte [edi + 2], al
mov al, byte [ebx + 0xf4]
mov byte [edi + 1], al
mov al, byte [ebx + 0xf8]
mov byte [edi], al
mov al, byte [ebx + 0xfc]
mov byte [edi + 3], al
add edi, edx
sub ebp, 1
jne 0x4f99f4
jmp 0x4f9d6c
test al, 8
je 0x4f9a51
cmp dword [ebx + 0xd4], 4
jne 0x4f9d6c
test ebp, ebp
je 0x4f9d6c
mov al, byte [ebx + 0xfc]
mov byte [edi + 3], al
add edi, edx
sub ebp, 1
jne 0x4f9a3c
jmp 0x4f9d6c
test al, 0x10
je 0x4f9bfa
test ebp, ebp
je 0x4f9d6c
cmp dword [ebx + 0xd4], 4
jne 0x4f9ba4
movzx edx, byte [edi + 3]
lea ecx, [edi + 2]
mov esi, dword [ebx + 0xfc]
mov dword [esp + 0x1c], edx
test esi, esi
jne 0x4f9a88
movzx eax, byte [ecx]
jmp 0x4f9acd
mov dword [esp + 0x10], ecx
test edx, edx
jne 0x4f9a98
mov eax, dword [ebx + 0xf0]
jmp 0x4f9ac6
movzx eax, byte [ecx]
mov esi, dword [ebx + 0x100]
imul ecx, dword [ebx + 0xf0], 0xff
imul eax, esi
imul esi, edx
imul eax, edx
add eax, ecx
imul ecx, dword [ebx + 0xfc], 0xff
add esi, ecx
mov ecx, dword [esp + 0x10]
cdq
idiv esi
mov edx, dword [esp + 0x1c]
mov byte [ecx], al
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
jne 0x4f9adf
movzx eax, byte [edi + 1]
jmp 0x4f9b1c
test edx, edx
jne 0x4f9aee
mov eax, dword [ebx + 0xf4]
cdq
idiv ecx
jmp 0x4f9b1c
mov esi, dword [ebx + 0x100]
movzx eax, byte [edi + 1]
imul ecx, dword [ebx + 0xf4], 0xff
imul eax, esi
imul esi, edx
imul eax, edx
add eax, ecx
imul ecx, dword [ebx + 0xfc], 0xff
cdq
add esi, ecx
idiv esi
mov byte [edi + 1], al
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
jne 0x4f9b2e
movzx eax, byte [edi]
jmp 0x4f9b6e
mov edx, dword [esp + 0x1c]
test edx, edx
jne 0x4f9b41
mov eax, dword [ebx + 0xf8]
cdq
idiv ecx
jmp 0x4f9b6e
mov esi, dword [ebx + 0x100]
movzx eax, byte [edi]
imul ecx, dword [ebx + 0xf8], 0xff
imul eax, esi
imul esi, edx
imul eax, edx
add eax, ecx
imul ecx, dword [ebx + 0xfc], 0xff
cdq
add esi, ecx
idiv esi
mov byte [edi], al
mov eax, dword [ebx + 0x100]
imul eax, dword [esp + 0x1c]
imul ecx, dword [ebx + 0xfc], 0xff
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
mov byte [edi + 3], al
add edi, dword [esp + 0x18]
sub ebp, 1
jne 0x4f9a6e
jmp 0x4f9d6c
mov ecx, 0xff
movzx eax, byte [edi + 2]
imul eax, dword [ebx + 0x100]
add eax, dword [ebx + 0xf0]
cdq
idiv ecx
mov byte [edi + 2], al
movzx eax, byte [edi + 1]
imul eax, dword [ebx + 0x100]
add eax, dword [ebx + 0xf4]
cdq
idiv ecx
mov byte [edi + 1], al
movzx eax, byte [edi]
imul eax, dword [ebx + 0x100]
add eax, dword [ebx + 0xf8]
cdq
idiv ecx
mov byte [edi], al
add edi, dword [esp + 0x18]
sub ebp, 1
jne 0x4f9ba9
jmp 0x4f9d6c
test al, 0x20
je 0x4f9d28
cmp dword [ebx + 0xd4], 4
jne 0x4f9d28
test ebp, ebp
je 0x4f9d6c
movzx edx, byte [edi + 3]
lea ecx, [edi + 2]
mov esi, dword [ebx + 0xfc]
mov dword [esp + 0x1c], edx
test esi, esi
jne 0x4f9c31
movzx eax, byte [ecx]
jmp 0x4f9c76
mov dword [esp + 0x10], ecx
test edx, edx
jne 0x4f9c41
mov eax, dword [ebx + 0xf0]
jmp 0x4f9c6f
movzx eax, byte [ecx]
mov esi, dword [ebx + 0x100]
imul ecx, dword [ebx + 0xf0], 0xff
imul eax, esi
imul esi, edx
imul eax, edx
add eax, ecx
imul ecx, dword [ebx + 0xfc], 0xff
add esi, ecx
mov ecx, dword [esp + 0x10]
cdq
idiv esi
mov edx, dword [esp + 0x1c]
mov byte [ecx], al
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
jne 0x4f9c88
movzx eax, byte [edi + 1]
jmp 0x4f9cc5
test edx, edx
jne 0x4f9c97
mov eax, dword [ebx + 0xf4]
cdq
idiv ecx
jmp 0x4f9cc5
mov esi, dword [ebx + 0x100]
movzx eax, byte [edi + 1]
imul ecx, dword [ebx + 0xf4], 0xff
imul eax, esi
imul esi, edx
imul eax, edx
add eax, ecx
imul ecx, dword [ebx + 0xfc], 0xff
cdq
add esi, ecx
idiv esi
mov byte [edi + 1], al
mov ecx, dword [ebx + 0xfc]
test ecx, ecx
jne 0x4f9cd7
movzx eax, byte [edi]
jmp 0x4f9d17
mov edx, dword [esp + 0x1c]
test edx, edx
jne 0x4f9cea
mov eax, dword [ebx + 0xf8]
cdq
idiv ecx
jmp 0x4f9d17
mov esi, dword [ebx + 0x100]
movzx eax, byte [edi]
imul ecx, dword [ebx + 0xf8], 0xff
imul eax, esi
imul esi, edx
imul eax, edx
add eax, ecx
imul ecx, dword [ebx + 0xfc], 0xff
cdq
add esi, ecx
idiv esi
mov byte [edi], al
add edi, dword [esp + 0x18]
sub ebp, 1
jne 0x4f9c17
jmp 0x4f9d6c
test ebp, ebp
je 0x4f9d6c
mov al, byte [ebx + 0xf0]
mov byte [edi + 2], al
mov al, byte [ebx + 0xf4]
mov byte [edi + 1], al
mov al, byte [ebx + 0xf8]
mov byte [edi], al
add edi, edx
sub ebp, 1
jne 0x4f9d2c
jmp 0x4f9d6c
test ebp, ebp
je 0x4f9d6c
push edi
push esi
push dword [esp + 0x24]
push ebx
call fcn.004f9481
add edi, dword [esp + 0x28]
add esp, 0x10
inc esi
sub ebp, 1
jne 0x4f9d53
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret