Function at 0x478748
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x4a52a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x49c
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x38], ebx
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x6c]
mov dword [esp + 0x68], 0x44
rep stosd dword es:[edi], eax
mov dword [esp + 0x2c], eax
mov ebp, 1
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x4b4], ebp
mov dword [esp + 0x5c], 0xc
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], eax
call fcn.0050d46e
lea ecx, [esp + 0x14]
mov byte [esp + 0x4b4], 2
call fcn.0050d46e
mov edx, dword [0x4cf2c4]
mov ecx, dword [0x4cf2c0]
mov eax, dword [0x4cf2c8]
mov dword [esp + 0x40], edx
xor edx, edx
mov dword [esp + 0x3c], ecx
mov cx, word [0x4cf2cc]
mov dword [esp + 0x4a], edx
mov dword [esp + 0x4e], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x52], edx
lea eax, [esp + 0x3c]
mov word [esp + 0x48], cx
mov dword [esp + 0x56], edx
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x4b8], 3
mov word [esp + 0x5e], dx
call fcn.0050d47a
push 0x4cf2bc
push 0x4cf2b8
lea ecx, [esp + 0x18]
call fcn.0050d6ae
push 0x4cf2b4
push 0x4cf2b0
lea ecx, [esp + 0x18]
call fcn.0050d6ae
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x80
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 3
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
push ebp
lea ecx, [esp + 0x50]
push 0x80000000
push ecx
call dword [fcn.004b4158]
mov esi, eax
push ebx
push esi
call dword [0x4b4184]
mov edi, eax
lea edx, [edi + 1]
push edx
call fcn.0050d486
add esp, 4
mov ebp, eax
lea eax, [esp + 0x18]
xor bl, bl
push 0
push eax
push edi
push ebp
push esi
mov dword [esp + 0x2c], 0
call dword [0x4b4178]
push esi
call dword [fcn.004b4074]
xor eax, eax
dec edi
test edi, edi
jle 0x4788cf
mov cl, byte [eax + ebp]
xor bl, cl
inc eax
cmp eax, edi
jl 0x4788c5
mov cl, byte [eax + ebp]
push ebp
not cl
xor bl, cl
mov byte [esp + 0x20], bl
call fcn.0050d474
add esp, 4
push esi
mov esi, dword [fcn.004b4074]
call esi
mov edx, dword [esp + 0x1c]
and edx, 0xff
mov dword [esp + 0x1c], edx
jne 0x478a4e
xor ebx, ebx
lea eax, [esp + 0x5c]
push ebx
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
call dword [0x4b4174]
test eax, eax
je 0x478a4e
lea eax, [esp + 0x68]
push eax
call dword [0x4b4170]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x4c4]
mov edx, dword [esp + 0x4c0]
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
push ecx
lea eax, [esp + 0x40]
push edx
push eax
lea ecx, [esp + 0x1c]
push 0x4cf2a4
push ecx
mov dword [esp + 0xa8], 0x101
mov word [esp + 0xac], bx
call fcn.0050d5e2
add esp, 0x14
lea edx, [esp + 0x28]
lea eax, [esp + 0x68]
lea ecx, [esp + 0x10]
push edx
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push ebx
call fcn.0050d492
push eax
push ebx
call dword [fcn.004b403c]
test eax, eax
je 0x478a35
mov ecx, dword [esp + 0x20]
push ecx
call esi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xad]
mov byte [esp + 0xac], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x1c]
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
push edx
lea eax, [esp + 0xb4]
push 0x3ff
push eax
push ecx
call dword [0x4b4178]
lea edx, [esp + 0xac]
lea ecx, [esp + 0x14]
push edx
call fcn.0050d47a
mov eax, dword [esp + 0x28]
push 0xffffffffffffffff
push eax
call dword [fcn.004b4054]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x20], ebx
call dword [fcn.004b414c]
cmp dword [esp + 0x18], ebx
je 0x478a27
push 0x4d85a8
lea ecx, [esp + 0x18]
call fcn.0050d47a
mov eax, dword [esp + 0x28]
push eax
call esi
mov ecx, dword [esp + 0x2c]
push ecx
jmp 0x478a3a
mov edx, dword [esp + 0x20]
push edx
call esi
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.0050d48c
mov eax, dword [esp + 0x24]
push eax
call esi
mov esi, dword [esp + 0x4bc]
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.0050d618
mov dword [esp + 0x38], 1
lea ecx, [esp + 0x14]
mov byte [esp + 0x4b4], 2
call fcn.0050d468
lea ecx, [esp + 0x10]
mov byte [esp + 0x4b4], 1
call fcn.0050d468
lea ecx, [esp + 0x4c4]
mov byte [esp + 0x4b4], 0
call fcn.0050d468
mov ecx, dword [esp + 0x4ac]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x4a8
ret