Function at 0x477e5c
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push esi
push edi
mov ecx, dword [esp + 0x1c]
cmp ecx, 0
je 0x478025
call 0x477e75
pop ebp
pushfd
cld
cmp dword [esp + 0x2c], 0
je 0x478070
lea ebp, [ebp - 0x1495]
lea edi, [esp - 0x134]
and edi, 0xffffffc0
mov eax, ebp
lea ebx, [ebp + 0x800]
mov edx, edi
and eax, 0xfff
and ebx, 0xfff
and edx, 0xfff
cmp edx, ebx
jb 0x477ec5
sub edx, ebx
sub edi, edx
jmp 0x477ed8
sub edx, eax
and edx, 0xfff
add edx, 0x140
sub edi, edx
nop
nop
nop
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
xchg edi, esp
add esp, 4
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x12c], 0
mov ebx, edx
mov ecx, 0x3d
sub ebx, ebp
mov esi, edx
and ebx, 0xfff
lea edi, [esp + 0x3c]
cmp ebx, 0x800
jb 0x477f40
cmp ebx, 0xf0c
jb 0x477f48
mov dword [esp + 0x20], edi
mov esi, esi
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov edi, 0x10
nop
mov eax, dword [ebp]
mov ebx, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp + 0x60]
lea ebp, [ebp + 0x80]
dec edi
jne 0x477f50
sub ebp, 0x800
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
test ecx, 0xfffffff0
je 0x47802c
mov eax, dword [edi]
mov ebx, dword [edi + 4]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
xor eax, dword [esi]
xor ebx, dword [esi + 4]
xor ecx, dword [esi + 8]
xor edx, dword [esi + 0xc]
mov edi, dword [esp + 0x20]
call fcn.00476760
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov ecx, dword [esp + 0x1c]
lea esi, [esi + 0x10]
mov dword [esp + 0x14], esi
lea edx, [edi + 0x10]
mov dword [esp + 0x18], edx
sub ecx, 0x10
test ecx, 0xfffffff0
mov dword [esp + 0x1c], ecx
jne 0x477f88
test ecx, 0xf
jne 0x47802c
mov esi, dword [esp + 0x24]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
cmp dword [esp + 0x12c], 0
mov edi, dword [esp + 0x20]
je 0x478020
mov ecx, 0x3c
xor eax, eax
nop
nop
mov esi, esi
rep stosd dword es:[edi], eax
mov esp, dword [esp + 0x10]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, edi
mov edi, dword [esp + 0x18]
push eax
mov ebx, 0x10
sub ebx, ecx
cmp edi, esi
je 0x47804d
nop
nop
mov esi, esi
rep movsb byte es:[edi], byte [esi]
jmp 0x478050
lea edi, [ecx + edi]
mov ecx, ebx
xor eax, eax
mov esi, esi
rep stosb byte es:[edi], al
pop edi
mov esi, dword [esp + 0x18]
mov eax, dword [edi]
mov ebx, dword [edi + 4]
mov dword [esp + 0x1c], 0x10
jmp 0x477f88
lea ebp, [ebp - 0x995]
lea edi, [esp - 0x134]
and edi, 0xffffffc0
mov eax, ebp
lea ebx, [ebp + 0x900]
mov edx, edi
and eax, 0xfff
and ebx, 0xfff
and edx, 0xfff
cmp edx, ebx
jb 0x4780af
sub edx, ebx
sub edi, edx
jmp 0x4780c0
sub edx, eax
and edx, 0xfff
add edx, 0x140
sub edi, edx
nop
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
xchg edi, esp
add esp, 4
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x12c], 0
mov ebx, edx
mov ecx, 0x3d
sub ebx, ebp
mov esi, edx
and ebx, 0xfff
lea edi, [esp + 0x3c]
cmp ebx, 0x900
jb 0x478128
cmp ebx, 0xf0c
jb 0x478130
mov dword [esp + 0x20], edi
mov esi, esi
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov edi, 0x12
nop
mov eax, dword [ebp]
mov ebx, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp + 0x60]
lea ebp, [ebp + 0x80]
dec edi
jne 0x478138
sub ebp, 0x900
cmp esi, dword [esp + 0x18]
je 0x47821c
mov edi, dword [esp + 0x24]
mov dword [esp + 0x28], edi
nop
nop
nop
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov edi, dword [esp + 0x20]
call fcn.00477278
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
sub esi, 0x10
jb 0x4781f4
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov dword [esp + 0x28], esi
lea esi, [esi + 0x10]
mov dword [esp + 0x14], esi
lea edi, [edi + 0x10]
mov dword [esp + 0x18], edi
jne 0x47816c
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov eax, dword [edi]
mov ebx, dword [edi + 4]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
jmp 0x4782c0
lea edi, [esp + 0x2c]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
lea ecx, [esi + 0x10]
mov esi, edi
mov edi, dword [esp + 0x18]
mov esi, esi
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
jmp 0x4781d2
lea edi, [esp + 0x2c]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov edi, dword [esp + 0x20]
call fcn.00477278
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
lea esi, [esi + 0x10]
mov dword [esp + 0x18], esi
lea esi, [esp + 0x2c]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov esi, dword [esp + 0x14]
lea esi, [esi + 0x10]
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x1c]
sub ecx, 0x10
jb 0x4782a8
mov dword [esp + 0x1c], ecx
jne 0x47821c
jmp 0x4782c0
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x2c]
lea edi, [ecx + edi]
lea esi, [ecx + esi + 0x10]
neg ecx
mov esi, esi
rep movsb byte es:[edi], byte [esi]
nop
nop
nop
cmp dword [esp + 0x12c], 0
mov edi, dword [esp + 0x20]
je 0x4782e0
mov ecx, 0x3c
xor eax, eax
mov esi, esi
rep stosd dword es:[edi], eax
mov esp, dword [esp + 0x10]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret