Function at 0x438ba0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
xor edi, edi
mov eax, dword [esi + 0x76]
mov dword [esi + 0x66], 2
test eax, eax
je 0x438d6e
mov ebx, 0x106
cmp dword [esi], 0
jne 0x438d6e
mov edx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
xor ecx, ecx
mov ebp, dword [esi + 0x52]
mov cl, byte [eax + edx + 2]
and edx, 0x7fff
mov eax, ecx
mov ecx, dword [esi + 0x62]
and ecx, 0x1ff
and eax, 0x3fff
shl ecx, 5
xor eax, ecx
xor ecx, ecx
mov dword [esi + 0x62], eax
mov cx, word [ebp + eax*2]
mov eax, dword [esi + 0x4e]
test ecx, ecx
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x62]
mov eax, dword [esi + 0x52]
mov bp, word [esi + 0x6a]
mov word [eax + edx*2], bp
je 0x438c39
mov edx, dword [esi + 0x6a]
sub edx, ecx
cmp edx, 0x7efa
ja 0x438c39
push esi
push ecx
call fcn.00438940
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x438c39
mov edi, eax
cmp edi, 3
push esi
jb 0x438cf5
mov ecx, dword [esi + 0x6a]
lea eax, [edi - 3]
push eax
mov eax, dword [esi + 0x6e]
sub ecx, eax
push ecx
call fcn.00439ee0
mov ecx, dword [esi + 0x76]
mov ebp, eax
mov eax, dword [esi + 0x7e]
add esp, 0xc
sub ecx, edi
cmp edi, eax
mov dword [esi + 0x76], ecx
ja 0x438cc5
dec edi
mov ecx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
inc ecx
mov ebx, dword [esi + 0x4e]
mov dword [esi + 0x6a], ecx
mov edx, ecx
xor ecx, ecx
mov cl, byte [eax + edx + 2]
mov eax, dword [esi + 0x62]
and eax, 0x1ff
and ecx, 0x3fff
shl eax, 5
xor ecx, eax
mov eax, dword [esi + 0x52]
mov dword [esi + 0x62], ecx
and edx, 0x7fff
mov cx, word [eax + ecx*2]
dec edi
mov word [ebx + edx*2], cx
mov edx, dword [esi + 0x62]
mov eax, dword [esi + 0x52]
mov cx, word [esi + 0x6a]
mov word [eax + edx*2], cx
jne 0x438c6a
mov eax, dword [esi + 0x6a]
mov ebx, 0x106
inc eax
mov dword [esi + 0x6a], eax
jmp 0x438d1b
mov eax, dword [esi + 0x6a]
mov edx, dword [esi + 0x4a]
add eax, edi
xor ecx, ecx
add edx, eax
mov dword [esi + 0x6a], eax
xor eax, eax
xor edi, edi
mov cl, byte [edx]
mov dword [esi + 0x62], ecx
mov al, byte [edx + 1]
and ecx, 0x1ff
and eax, 0x3fff
shl ecx, 5
xor eax, ecx
mov dword [esi + 0x62], eax
jmp 0x438d1b
mov ecx, dword [esi + 0x4a]
mov edx, dword [esi + 0x6a]
xor eax, eax
mov al, byte [ecx + edx]
push eax
push 0
call fcn.00439ee0
mov ecx, dword [esi + 0x76]
mov ebp, eax
mov eax, dword [esi + 0x6a]
add esp, 0xc
dec ecx
inc eax
mov dword [esi + 0x76], ecx
mov dword [esi + 0x6a], eax
test ebp, ebp
je 0x438d47
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x438d2d
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x438d2f
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.00439c60
mov eax, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], eax
cmp dword [esi + 0x76], ebx
jae 0x438d63
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x438d63
push esi
call fcn.00438a90
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x438d4c
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x438bc1
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x438d7c
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x438d7e
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.00439c60
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
ret