Function at 0x475a00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x38]
mov edx, dword [edi + 8]
test edx, edx
jne 0x475a72
mov ebx, dword [esp + 0x40]
test ebx, ebx
je 0x475a3d
mov eax, dword [edi + 0x10]
mov byte [edi + 4], 6
mov dword [edi + 8], 0x40
push 0x100
mov eax, dword [eax]
call eax
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x475a47
mov dword [edi + 8], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
push 0x100
push 0
push eax
call sub.MSVCRT.dll_memset
mov ebp, dword [esp + 0x48]
push ebp
push dword [esp + 0x44]
call fcn.00475680
mov edx, eax
add esp, 0x14
mov eax, dword [edi + 8]
dec eax
and edx, eax
jmp 0x475c9d
mov eax, dword [esp + 0x3c]
mov ecx, eax
mov esi, dword [esp + 0x34]
mov al, byte [eax]
mov esi, dword [esi + 0x1f0]
mov dword [esp + 0x14], esi
mov byte [esp + 0x13], al
test al, al
je 0x475aa6
imul esi, esi, 0xf4243
inc ecx
movzx eax, al
xor esi, eax
mov al, byte [ecx]
test al, al
jne 0x475a90
mov dword [esp + 0x14], esi
lea ebp, [edx - 1]
xor bl, bl
mov edx, esi
mov esi, dword [edi]
and edx, ebp
cmp dword [esi + edx*4], 0
lea eax, [esi + edx*4]
je 0x475b1d
lea ebx, [ebx]
mov eax, dword [eax]
mov cl, byte [esp + 0x13]
mov eax, dword [eax]
cmp cl, byte [eax]
jne 0x475ae5
mov esi, dword [esp + 0x3c]
sub esi, eax
test cl, cl
je 0x475bee
mov cl, byte [esi + eax + 1]
inc eax
cmp cl, byte [eax]
je 0x475ad2
mov esi, dword [edi]
test bl, bl
jne 0x475b02
movzx ecx, byte [edi + 4]
mov ebx, ebp
not ebx
dec ecx
and ebx, dword [esp + 0x14]
mov eax, ebp
shr ebx, cl
shr eax, 2
and bl, al
or bl, 1
movzx ecx, bl
cmp edx, ecx
jae 0x475b12
mov eax, dword [edi + 8]
sub eax, ecx
add edx, eax
jmp 0x475b14
sub edx, ecx
cmp dword [esi + edx*4], 0
lea eax, [esi + edx*4]
jne 0x475ac0
cmp dword [esp + 0x40], 0
je 0x475a3d
mov bl, byte [edi + 4]
mov eax, dword [edi + 0xc]
movzx ecx, bl
dec ecx
shr eax, cl
test eax, eax
je 0x475c95
inc bl
mov eax, 1
movzx ecx, bl
shl eax, cl
mov dword [esp + 0x18], eax
mov byte [esp + 0x13], bl
mov dword [esp + 0x24], ecx
lea esi, [eax*4]
lea ebp, [eax - 1]
mov eax, dword [edi + 0x10]
push esi
mov eax, dword [eax]
call eax
mov ebx, eax
add esp, 4
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x475a3d
push esi
push 0
push ebx
call sub.MSVCRT.dll_memset
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x20], ecx
cmp dword [edi + 8], ecx
jbe 0x475c20
mov eax, dword [edi]
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x475c12
push dword [eax]
push dword [esp + 0x38]
call fcn.00475680
mov esi, eax
mov dword [esp + 0x30], eax
and esi, ebp
add esp, 8
xor dl, dl
cmp dword [ebx + esi*4], 0
je 0x475c07
mov edi, eax
nop
test dl, dl
jne 0x475bdd
mov ecx, dword [esp + 0x24]
mov edx, ebp
not edx
mov eax, ebp
and edx, edi
shr eax, 2
lea ecx, [ecx - 1]
shr edx, cl
and dl, al
or dl, 1
movzx ecx, dl
cmp esi, ecx
jae 0x475bfb
mov eax, dword [esp + 0x18]
sub eax, ecx
add esi, eax
jmp 0x475bfd
mov eax, dword [edi]
pop edi
pop esi
pop ebp
mov eax, dword [eax + edx*4]
pop ebx
add esp, 0x20
ret
sub esi, ecx
cmp dword [ebx + esi*4], 0
jne 0x475bc0
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov dword [ebx + esi*4], eax
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [edi + 8]
jb 0x475b92
mov eax, dword [edi + 0x10]
push dword [edi]
mov eax, dword [eax + 8]
call eax
mov al, byte [esp + 0x17]
add esp, 4
mov edx, dword [esp + 0x14]
mov byte [edi + 4], al
and edx, ebp
mov eax, dword [esp + 0x18]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x1c]
mov dword [edi], ebx
xor bl, bl
cmp dword [eax + edx*4], 0
je 0x475c95
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
test bl, bl
jne 0x475c74
mov ebx, ebp
lea ecx, [esi - 1]
not ebx
mov eax, ebp
and ebx, edi
shr eax, 2
shr ebx, cl
and bl, al
mov eax, dword [esp + 0x1c]
or bl, 1
movzx ecx, bl
cmp edx, ecx
jae 0x475c89
mov eax, dword [esp + 0x18]
sub eax, ecx
add edx, eax
mov eax, dword [esp + 0x1c]
jmp 0x475c8b
sub edx, ecx
cmp dword [eax + edx*4], 0
jne 0x475c57
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x3c]
mov eax, dword [edi + 0x10]
lea esi, [edx*4]
push ebx
mov eax, dword [eax]
call eax
mov ecx, dword [edi]
add esp, 4
mov dword [esi + ecx], eax
mov eax, dword [edi]
mov eax, dword [esi + eax]
test eax, eax
je 0x475a3d
push ebx
push 0
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [edi]
add esp, 0xc
mov ecx, dword [esi + ecx]
mov dword [ecx], ebp
mov eax, dword [edi]
inc dword [edi + 0xc]
pop edi
mov eax, dword [esi + eax]
pop esi
pop ebp
pop ebx
add esp, 0x20
ret