Function at 0x4795f5
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x24
test ecx, ecx
push ebx
je 0x479929
mov eax, dword [esp + 0x30]
test eax, eax
je 0x479929
mov bl, byte [ecx + 0x14]
cmp bl, 3
je 0x479622
cmp byte [eax], 0
je 0x479929
push edi
mov edi, dword [esp + 0x38]
test edi, edi
je 0x479921
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x479921
cdq
and edx, 0x7f
add eax, edx
push ebp
push esi
mov esi, eax
movzx eax, bl
sar esi, 7
dec eax
mov dword [esp + 0x10], esi
je 0x4798e5
dec eax
je 0x479834
dec eax
je 0x47966d
pop esi
pop ebp
pop edi
mov eax, 0xfffffffb
pop ebx
add esp, 0x24
ret
test esi, esi
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jle 0x479914
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x38], esi
xor esi, esi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov bl, byte [esp + 0x15]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax + 0x4c]
push ecx
add eax, 0x54
push eax
mov dword [esp + 0x38], edx
lea edx, [esp + 0x2c]
push edx
mov eax, edx
push eax
call fcn.0049c595
mov dl, byte [esp + 0x24]
mov al, byte [esp + 0x26]
shl dl, 1
mov cl, bl
shr cl, 7
or cl, dl
mov byte [esp + 0x24], cl
mov cl, al
shr cl, 7
shl bl, 1
or cl, bl
mov byte [esp + 0x25], cl
mov cl, byte [esp + 0x27]
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x28]
mov byte [esp + 0x26], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x29]
mov byte [esp + 0x27], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x2a]
mov byte [esp + 0x28], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x2b]
mov byte [esp + 0x29], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x2c]
mov byte [esp + 0x2a], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x2d]
mov byte [esp + 0x2b], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x2e]
mov byte [esp + 0x2c], dl
mov dl, al
shl cl, 1
shr dl, 7
add esp, 0x10
or dl, cl
mov cl, byte [esp + 0x1f]
mov byte [esp + 0x1d], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x20]
mov byte [esp + 0x1e], dl
shl cl, 1
mov dl, al
shr dl, 7
or dl, cl
mov cl, byte [esp + 0x21]
mov byte [esp + 0x1f], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x22]
shl cl, 1
mov byte [esp + 0x20], dl
mov dl, al
shr dl, 7
or dl, cl
mov cl, byte [esp + 0x23]
shr cl, 7
shl al, 1
or cl, al
mov byte [esp + 0x21], dl
mov byte [esp + 0x22], cl
mov edx, esi
and edx, 7
mov eax, esi
shr eax, 3
mov bl, byte [eax + edi]
mov cl, 7
sub cl, dl
shr bl, cl
mov cl, byte [esp + 0x23]
shl cl, 1
and bl, 1
or bl, cl
mov byte [esp + 0x23], bl
mov bl, byte [esp + 0x24]
and bl, 0x80
mov cl, dl
mov dl, byte [eax + ebp]
shr bl, cl
xor dl, bl
inc esi
cmp esi, 0x80
mov byte [eax + ebp], dl
jl 0x47969a
dec dword [esp + 0x38]
jne 0x479698
mov esi, dword [esp + 0x10]
mov eax, esi
pop esi
pop ebp
pop edi
shl eax, 7
pop ebx
add esp, 0x24
ret
test esi, esi
mov edx, dword [ecx + 8]
mov eax, dword [ecx + 0xc]
mov ebx, dword [ecx]
mov ebp, dword [ecx + 4]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
jle 0x479914
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x48]
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 0x4c]
push ecx
add eax, 0x54
push eax
lea edx, [esp + 0x2c]
push edx
push edi
call fcn.0049c935
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
xor eax, ebx
mov ebx, dword [esp + 0x2c]
xor ecx, ebp
mov ebp, dword [esp + 0x40]
xor edx, ebx
mov ebx, dword [esp + 0x30]
xor ebp, ebx
mov ebx, dword [edi]
mov dword [esi], eax
mov dword [esp + 0x40], ebp
mov ebp, dword [edi + 4]
mov dword [esp + 0x34], eax
mov dword [esi + 4], ecx
mov eax, dword [edi + 8]
mov dword [esi + 8], edx
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x38], ecx
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x48]
mov dword [esi + 0xc], edx
add esp, 0x10
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x38], eax
jne 0x479857
mov esi, dword [esp + 0x10]
mov eax, esi
pop esi
pop ebp
pop edi
shl eax, 7
pop ebx
add esp, 0x24
ret
test esi, esi
jle 0x479914
mov ebx, dword [esp + 0x48]
mov ebp, esi
lea ebx, [ebx]
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 0x4c]
push ecx
add eax, 0x54
push eax
push ebx
push edi
call fcn.0049c935
add esp, 0x10
add edi, 0x10
add ebx, 0x10
dec ebp
jne 0x4798f5
mov eax, esi
pop esi
pop ebp
pop edi
shl eax, 7
pop ebx
add esp, 0x24
ret
pop edi
xor eax, eax
pop ebx
add esp, 0x24
ret
mov eax, 0xfffffffb
pop ebx
add esp, 0x24
ret