Function at 0x478294
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff18
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x10]
mov eax, 0x484d60
call fcn.004da3d0
xor edx, edx
mov dword [ebp - 0x68], edx
mov word [ebp - 0x6e], 0
mov eax, esi
call fcn.004c8b68
mov dword [ebp - 0x88], eax
mov eax, esi
lea edx, [ebp - 0x8c]
mov ecx, 4
mov edi, dword [eax]
call dword [edi + 4]
mov eax, esi
lea edx, [ebp - 0x90]
mov ecx, 4
mov edi, dword [eax]
call dword [edi + 4]
cmp dword [ebp - 0x8c], 0xffffffff
jne 0x478367
cmp dword [ebp - 0x90], 0xffffffff
jne 0x478367
mov eax, esi
lea edx, [ebp - 0x94]
mov ecx, 4
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, esi
lea edx, [ebp - 0x98]
mov ecx, 4
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, esi
lea edx, [ebp - 0x9c]
mov ecx, 4
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, dword [ebp - 0x94]
push eax
mov edx, dword [ebp - 0x98]
push edx
mov ecx, dword [ebp - 0x9c]
push ecx
push esi
mov eax, dword [ebp + 0xc]
push eax
call fcn.00477ad8
add esp, 0x14
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
mov eax, edx
jmp 0x478992
mov edx, dword [ebp - 0x88]
mov eax, esi
call fcn.004c8b78
mov eax, dword [0x48d668]
mov edx, dword [eax + 0x318]
mov dword [ebp - 0x7c], edx
mov ecx, dword [eax + 0x31c]
add eax, 0x320
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x84], eax
mov eax, dword [ebp + 0x1c]
shl eax, 4
add eax, 0x1f
test eax, eax
jns 0x4783a6
add eax, 0x1f
sar eax, 5
shl eax, 2
mov dword [ebp - 0x78], eax
mov edx, dword [ebp - 0x78]
imul edx, dword [ebp + 0x20]
add edx, 0x1400
mov dword [ebp - 0x78], edx
mov ecx, dword [ebp - 0x78]
sar ecx, 1
jns 0x4783c9
adc ecx, 0
mov dword [ebp - 0x78], ecx
mov eax, dword [ebp - 0x78]
add eax, eax
push eax
call fcn.004d9878
pop ecx
mov dword [ebp - 0x64], eax
mov dl, 1
mov eax, dword [0x44fb54]
call fcn.00477a40
mov dword [ebp - 0xa0], eax
mov dl, 1
mov eax, dword [0x44fb54]
call fcn.00477a40
mov dword [ebp - 0xa4], eax
cmp ebx, 1
jne 0x47854c
mov ecx, dword [ebp + 0x14]
mov edx, esi
mov eax, dword [ebp - 0xa0]
call fcn.004c8c2c
cmp dword [ebp - 0x7c], 0
jle 0x4787d2
cmp dword [ebp + 0x14], 0x2800
jle 0x4787d2
mov edx, 4
mov eax, dword [ebp - 0xa0]
call fcn.004c8b78
mov eax, dword [ebp - 0xa0]
lea edx, [ebp - 0xd4]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x47845f
adc edx, 0
mov eax, dword [ebp - 0xa0]
call fcn.004c8b78
mov eax, dword [ebp - 0xa0]
lea edx, [ebp - 0xe8]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 4]
cmp dword [ebp - 0x7c], 1
jne 0x4784dd
push 0x15
push 0
lea eax, [ebp - 0xc0]
push eax
call fcn.004da07c
add esp, 0xc
mov edx, dword [ebp - 0x80]
push edx
push 0x4848bc
lea ecx, [ebp - 0xc0]
push ecx
call fcn.004dcbf4
add esp, 0xc
xor esi, esi
lea edx, [ebp - 0xd4]
lea eax, [ebp - 0xe8]
mov ecx, 0x14
sub ecx, esi
inc esi
mov cl, byte [ebp + ecx - 0xc0]
xor cl, byte [eax]
xor cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
cmp esi, 0x14
jl 0x4784bf
jmp 0x47850f
cmp dword [ebp - 0x7c], 2
jne 0x47850f
xor esi, esi
lea eax, [ebp - 0xd4]
lea edx, [ebp - 0xe8]
mov ecx, 0x14
mov ebx, dword [ebp - 0x84]
sub ecx, esi
inc esi
mov cl, byte [ebx + ecx]
xor cl, byte [edx]
xor cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp esi, 0x14
jl 0x4784f1
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x478519
adc edx, 0
mov eax, dword [ebp - 0xa0]
call fcn.004c8b78
mov eax, dword [ebp - 0xa0]
lea edx, [ebp - 0xe8]
mov ecx, 0x14
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0xa0]
call fcn.004c8b78
jmp 0x4787d2
cmp ebx, 2
je 0x47855a
cmp ebx, 3
jne 0x4787d2
mov dl, 1
mov eax, dword [0x44fb54]
call fcn.00477a40
mov ebx, eax
mov eax, esi
lea edx, [ebp - 0x6c]
mov ecx, 4
mov edi, dword [eax]
call dword [edi + 4]
mov ecx, dword [ebp + 0x14]
sub ecx, 4
mov edx, esi
mov eax, ebx
call fcn.004c8c2c
cmp dword [ebp - 0x7c], 0
jle 0x47869c
cmp dword [ebp + 0x14], 0x2800
jle 0x47869c
xor edx, edx
mov eax, ebx
call fcn.004c8b78
mov eax, ebx
lea edx, [ebp - 0xd4]
mov ecx, 0x14
mov esi, dword [eax]
call dword [esi + 4]
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x4785c2
adc edx, 0
sub edx, 4
mov eax, ebx
call fcn.004c8b78
mov eax, ebx
lea edx, [ebp - 0xe8]
mov ecx, 0x14
mov esi, dword [eax]
call dword [esi + 4]
cmp dword [ebp - 0x7c], 1
jne 0x47863b
push 0x15
push 0
lea eax, [ebp - 0xc0]
push eax
call fcn.004da07c
add esp, 0xc
mov edx, dword [ebp - 0x80]
push edx
push 0x4848bf
lea ecx, [ebp - 0xc0]
push ecx
call fcn.004dcbf4
add esp, 0xc
xor esi, esi
lea edx, [ebp - 0xd4]
lea eax, [ebp - 0xe8]
mov ecx, 0x14
sub ecx, esi
inc esi
mov cl, byte [ebp + ecx - 0xc0]
xor cl, byte [eax]
xor cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
cmp esi, 0x14
jl 0x47861d
jmp 0x47866d
cmp dword [ebp - 0x7c], 2
jne 0x47866d
xor esi, esi
lea eax, [ebp - 0xd4]
lea edx, [ebp - 0xe8]
mov ecx, 0x14
mov edi, dword [ebp - 0x84]
sub ecx, esi
inc esi
mov cl, byte [edi + ecx]
xor cl, byte [edx]
xor cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp esi, 0x14
jl 0x47864f
mov edx, dword [ebp + 0x14]
sar edx, 1
jns 0x478677
adc edx, 0
sub edx, 4
mov eax, ebx
call fcn.004c8b78
mov eax, ebx
lea edx, [ebp - 0xe8]
mov ecx, 0x14
mov esi, dword [eax]
call dword [esi + 8]
xor edx, edx
mov eax, ebx
call fcn.004c8b78
mov eax, dword [ebp - 0xa0]
mov edx, dword [ebp - 0x6c]
inc edx
mov ecx, dword [eax]
call dword [ecx]
mov eax, dword [ebp - 0xa0]
call fcn.004c8b84
mov dword [ebp - 0xa8], eax
mov eax, ebx
call fcn.004c8b84
push eax
lea ecx, [ebp - 0xa8]
mov edx, dword [ebx + 4]
push edx
push ecx
mov eax, dword [ebp - 0xa0]
mov edx, dword [eax + 4]
push edx
call fcn.004865e4
add esp, 0x10
test eax, eax
je 0x4787ab
mov esi, ebx
mov dword [ebp - 8], esi
test esi, esi
je 0x47870f
mov eax, dword [esi]
mov dword [ebp - 4], eax
mov word [ebp - 0x4c], 0x14
mov edx, 3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 8
mov ebx, dword [ebp - 0xa0]
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x47873a
mov eax, dword [ebx]
mov dword [ebp - 0xc], eax
mov word [ebp - 0x4c], 0x2c
mov edx, 3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x20
mov ebx, dword [ebp - 0xa4]
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x478765
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
mov word [ebp - 0x4c], 0x44
mov edx, 3
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x38
mov edx, dword [ebp - 0x64]
push edx
call fcn.004d96b0
pop ecx
mov edx, 0x4848c2
mov word [ebp - 0x4c], 0x50
lea eax, [ebp - 0x1c]
call fcn.004e5404
inc dword [ebp - 0x40]
mov eax, dword [eax]
call fcn.004ac3b4
dec dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004e54bc
mov ecx, dword [ebp - 0x5c]
mov dword fs:[0], ecx
jmp 0x478992
mov esi, ebx
mov dword [ebp - 0x24], esi
test esi, esi
je 0x4787d2
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov word [ebp - 0x4c], 0x68
mov edx, 3
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x5c
xor edx, edx
mov eax, dword [ebp - 0xa0]
call fcn.004c8b78
mov edx, dword [ebp - 0xa0]
mov ebx, dword [edx + 4]
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x68]
mov cx, word [ebx]
mov word [eax + edx*2], cx
inc dword [ebp - 0x68]
mov eax, dword [ebp - 0xa0]
call fcn.004c8b84
mov ecx, eax
sar ecx, 1
jns 0x47880c
adc ecx, 0
lea edx, [ecx - 3]
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x6c], 1
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x74]
jge 0x478891
mov edx, dword [ebp - 0x6c]
cmp word [ebx + edx*2], 0
jne 0x478872
mov eax, dword [ebp - 0x6c]
cmp word [ebx + eax*2 + 2], 0
jne 0x478872
mov edx, dword [ebp - 0x6c]
cmp word [ebx + edx*2 + 4], 0
je 0x478872
xor edx, edx
mov eax, dword [ebp - 0x64]
mov esi, dword [ebp - 0x68]
lea eax, [eax + esi*2]
jmp 0x478860
mov esi, dword [ebp - 0x6c]
mov si, word [ebx + esi*2 + 6]
mov word [eax], si
add eax, 2
inc dword [ebp - 0x68]
inc edx
mov esi, dword [ebp - 0x6c]
movzx esi, word [ebx + esi*2 + 4]
cmp edx, esi
jl 0x47884e
add dword [ebp - 0x6c], 3
jmp 0x478886
mov esi, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x68]
mov si, word [ebx + esi*2]
mov word [eax + edx*2], si
inc dword [ebp - 0x68]
inc dword [ebp - 0x6c]
mov eax, dword [ebp - 0x6c]
cmp eax, dword [ebp - 0x74]
jl 0x478821
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x68]
lea eax, [edx + eax*2]
cmp ecx, dword [ebp - 0x6c]
jle 0x4788b7
mov edx, dword [ebp - 0x6c]
mov dx, word [ebx + edx*2]
mov word [eax], dx
inc dword [ebp - 0x68]
add eax, 2
inc dword [ebp - 0x6c]
cmp ecx, dword [ebp - 0x6c]
jg 0x47889f
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x78]
jle 0x4788fb
mov word [ebp - 0x4c], 0x74
mov edx, 0x4848d5
lea eax, [ebp - 0x28]
call fcn.004e5404
inc dword [ebp - 0x40]
mov eax, dword [eax]
call fcn.004ac3b4
dec dword [ebp - 0x40]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004e54bc
mov ecx, dword [ebp - 0x5c]
mov dword fs:[0], ecx
jmp 0x478992
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x68]
add ecx, ecx
mov edx, dword [ebp - 0x64]
mov ebx, dword [eax]
call dword [ebx + 8]
xor edx, edx
mov eax, dword [ebp - 0xa4]
call fcn.004c8b78
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov ebx, dword [ebp - 0xa0]
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x478954
mov eax, dword [ebx]
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x4c], 0x8c
mov edx, 3
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x80
mov ebx, dword [ebp - 0xa4]
mov dword [ebp - 0x38], ebx
test ebx, ebx
je 0x47897f
mov eax, dword [ebx]
mov dword [ebp - 0x34], eax
mov word [ebp - 0x4c], 0xa4
mov edx, 3
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x4c], 0x98
mov edx, dword [ebp - 0x64]
push edx
call fcn.004d96b0
pop ecx
mov eax, dword [ebp - 0x5c]
mov dword fs:[0], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret