Function at 0x78ed00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xb4
mov eax, dword [esp + 0xb8]
push ebx
push ebp
push esi
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov ebp, dword [eax + 4]
mov esi, dword [fcn.008c9050]
mov ebx, dword [eax + 0x14]
push edi
mov edi, dword [eax + 8]
mov dword [esp + 0x14], ecx
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x10], edx
mov edx, dword [eax + 0x1c]
push 4
push ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
call esi
test eax, eax
jne 0x78ef68
cmp dword [ebp], 0x474e5353
jne 0x78ef68
mov eax, dword [esp + 0x10]
test eax, eax
je 0x78ed92
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x78ed92
push ebx
push eax
call dword [fcn.008c9068]
test eax, eax
je 0x78ed82
pop edi
pop esi
pop ebp
mov eax, 0xc9
pop ebx
add esp, 0xb4
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call esi
test eax, eax
je 0x78eda2
pop edi
pop esi
pop ebp
mov eax, 0xc9
pop ebx
add esp, 0xb4
ret
test ebx, ebx
je 0x78ed92
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x78ed92
cmp eax, ebx
ja 0x78ed92
cmp ebx, 0x70
ja 0x78ef58
cmp eax, 0x70
ja 0x78ef58
lea edx, [esp + 0x30]
push edx
push edi
push ebp
call fcn.0078ef80
add esp, 0xc
test eax, eax
jne 0x78ef6d
mov al, bl
and al, 0xf
mov byte [esp + 0x24], al
mov edi, dword [esp + 0x24]
and edi, 0xff
sub ebx, edi
mov dword [esp + 0x28], edi
shr ebx, 4
mov cl, bl
xor bl, bl
test cl, cl
mov byte [esp + 0x2c], cl
mov byte [esp + 0x20], bl
jbe 0x78eeba
test bl, bl
jne 0x78ee24
mov eax, dword [esp + 0x10]
push 0x10
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.00799510
add esp, 0xc
jmp 0x78ee31
cmp bl, 1
jne 0x78ee31
mov dword [esp + 0x14], 1
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
and esi, 0xff
lea eax, [esp + 0x34]
mov edx, esi
shl edx, 4
lea edi, [esp + edx + 0x54]
mov edx, dword [esp + 0x14]
push edi
push eax
push ecx
push edx
push ebp
call fcn.00785d50
test eax, eax
jne 0x78ef0d
mov ecx, dword [esp + 0x2c]
lea eax, [esi + 1]
and ecx, 0xff
cmp eax, ecx
jg 0x78ee93
mov edx, dword [esp + 0x10]
mov ecx, edi
shl eax, 4
lea esi, [esp + 0x34]
add eax, edx
mov edi, 0x10
mov dl, byte [eax]
xor dl, byte [ecx]
inc eax
inc ecx
mov byte [esi], dl
inc esi
dec edi
jne 0x78ee87
mov al, byte [esp + 0x2c]
inc bl
cmp bl, al
mov byte [esp + 0x20], bl
jb 0x78ee0a
cmp bl, 1
jne 0x78eeb2
mov dword [esp + 0x14], 1
mov al, byte [esp + 0x24]
mov edi, dword [esp + 0x28]
test al, al
je 0x78ef34
push 0x10
lea eax, [esp + 0x38]
push 0
push eax
call fcn.00799530
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
and esi, 0xff
push edi
shl esi, 4
lea eax, [esp + 0x44]
lea edx, [esi + ecx]
push edx
push eax
call fcn.00799510
mov eax, dword [esp + 0x48]
add esp, 0x18
lea ecx, [esp + 0x44]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
push ebp
call fcn.00785d50
test eax, eax
je 0x78ef21
push eax
call fcn.0078c810
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
lea edx, [esp + 0x44]
push edi
lea eax, [esp + esi + 0x58]
push edx
push eax
call fcn.00799510
add esp, 0xc
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x54]
push ecx
push edx
push eax
call fcn.00799510
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret
pop edi
pop esi
pop ebp
mov eax, 0xe4
pop ebx
add esp, 0xb4
ret
mov eax, 0xcb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret