Function at 0x479690
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x479a1d
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [0x47837c]
call fcn.00478aa0
test al, al
je 0x4799f4
mov edx, dword [ebp - 0xc]
mov eax, dword [0x47837c]
call fcn.00478ac4
test eax, eax
jns 0x4796f2
add eax, 7
sar eax, 3
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 8]
jne 0x4799f4
lea eax, [ebp - 0x44]
call fcn.00470684
lea eax, [ebp - 0x44]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.0046e444
mov eax, dword [ebp - 0x44]
call fcn.00470634
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x44]
call fcn.004706c0
cmp dword [ebp - 0x34], 0
je 0x4799f4
dec dword [ebp - 0x34]
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
call fcn.00479638
test al, al
je 0x4799f4
mov eax, dword [ebp - 0x30]
add eax, dword [ebp + 0x20]
add eax, 2
cmp eax, dword [ebp - 0x38]
jg 0x4799f4
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
cmp byte [eax + edx - 1], 0xbc
jne 0x4799f4
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
dec eax
push eax
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
mov eax, dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x30]
dec ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.00402a48
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x14]
lea eax, [edx + eax - 1]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x30]
call fcn.00402a48
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x30]
dec ecx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x30]
call fcn.004793bc
mov eax, dword [ebp - 0x38]
shl eax, 3
sub eax, dword [ebp - 0x34]
test eax, eax
jle 0x47985f
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x2c], 1
mov ecx, 8
sub ecx, dword [ebp - 0x2c]
mov eax, 1
shl eax, cl
mov edx, dword [ebp - 0x18]
movzx edx, byte [edx]
and eax, edx
jne 0x4799f4
inc dword [ebp - 0x2c]
dec dword [ebp - 0x48]
jne 0x47983a
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, 2
test eax, eax
jl 0x479891
inc eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
mov al, byte [eax + edx]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
xor byte [edx + ecx], al
inc dword [ebp - 0x2c]
dec dword [ebp - 0x48]
jne 0x479877
mov eax, dword [ebp - 0x38]
shl eax, 3
sub eax, dword [ebp - 0x34]
test eax, eax
jle 0x4798c3
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x2c], 1
mov ecx, 8
sub ecx, dword [ebp - 0x2c]
mov al, 1
shl al, cl
not al
mov edx, dword [ebp - 0x18]
and byte [edx], al
inc dword [ebp - 0x2c]
dec dword [ebp - 0x48]
jne 0x4798a8
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, dword [ebp + 0x20]
sub eax, 3
test eax, eax
jl 0x4798f6
inc eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
cmp byte [eax + edx], 0
jne 0x4799f4
inc dword [ebp - 0x2c]
dec dword [ebp - 0x48]
jne 0x4798de
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, dword [ebp + 0x20]
mov edx, dword [ebp - 0x18]
cmp byte [edx + eax - 2], 1
jne 0x4799f4
mov eax, dword [ebp + 0x20]
push eax
lea eax, [ebp - 0x24]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
mov eax, dword [ebp - 0x30]
add eax, 8
add eax, dword [ebp + 0x20]
push eax
lea eax, [ebp - 0x28]
mov ecx, 1
mov edx, dword [0x46da70]
call fcn.00406234
add esp, 4
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, dword [ebp + 0x20]
mov edx, dword [ebp - 0x18]
lea eax, [edx + eax - 1]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp + 0x20]
call fcn.00402a48
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov edx, 8
call fcn.00403114
mov eax, dword [ebp - 0x28]
lea edx, [eax + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x30]
call fcn.00402a48
cmp dword [ebp + 0x20], 0
jle 0x47999e
mov eax, dword [ebp - 0x30]
add eax, 8
mov edx, dword [ebp - 0x28]
add edx, eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 0x20]
call fcn.00402a48
mov ecx, dword [ebp - 0xc]
mov dl, 1
mov eax, dword [0x47837c]
call fcn.004784c4
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp + 0x20]
add ecx, 8
add ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
call fcn.00478b5c
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
call fcn.00478b80
mov eax, dword [ebp - 0x3c]
call fcn.004039fc
lea eax, [ebp - 0x40]
call fcn.00404ddc
mov edx, eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x30]
call fcn.00408fdc
test al, al
je 0x4799f4
mov byte [ebp - 0xd], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x479a24
lea eax, [ebp - 0x40]
call fcn.004048d4
lea eax, [ebp - 0x28]
mov edx, dword [0x46da70]
mov ecx, 6
call fcn.00405540
ret