Function at 0x438da0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
push edi
mov edi, 2
cmp dword [esi + 0xd88], 3
jg 0x438dc4
push esi
call fcn.00438ba0
add esp, 4
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x76]
test eax, eax
je 0x438ff6
push ebx
cmp dword [esi], 0
jne 0x438fd9
mov edx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
xor ecx, ecx
mov ebx, dword [esi + 0x52]
mov cl, byte [edx + eax + 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 [ebx + 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 bx, word [esi + 0x6a]
mov word [eax + edx*2], bx
mov ebx, dword [esi + 0x6e]
mov dword [esi + 0x66], edi
mov edi, 2
je 0x438e75
mov edx, dword [esi + 0x66]
mov eax, dword [esi + 0x7e]
cmp edx, eax
jae 0x438e75
mov eax, dword [esi + 0x6a]
sub eax, ecx
cmp eax, 0x7efa
ja 0x438e75
push esi
push ecx
call fcn.00438940
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x438e5b
mov edi, eax
cmp edi, 3
jne 0x438e75
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x6e]
sub ecx, edx
cmp ecx, 0x1000
jbe 0x438e75
mov edi, 2
mov eax, dword [esi + 0x66]
cmp eax, 3
jb 0x438f4c
cmp edi, eax
ja 0x438f4c
mov edx, dword [esi + 0x6a]
add eax, 0xfffffffd
sub edx, ebx
push esi
dec edx
push eax
push edx
call fcn.00439ee0
mov ecx, dword [esi + 0x66]
mov edi, dword [esi + 0x76]
mov edx, 1
add esp, 0xc
sub edx, ecx
add edi, edx
add ecx, 0xfffffffe
mov dword [esi + 0x76], edi
mov dword [esi + 0x66], ecx
mov ebx, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
mov edi, dword [esi + 0x62]
inc ebx
mov dword [esi + 0x6a], ebx
mov edx, ebx
xor ebx, ebx
and edi, 0x1ff
mov bl, byte [edx + ecx + 2]
and edx, 0x7fff
mov ecx, ebx
mov ebx, dword [esi + 0x4e]
and ecx, 0x3fff
shl edi, 5
xor ecx, edi
mov edi, dword [esi + 0x52]
mov dword [esi + 0x62], ecx
mov cx, word [edi + ecx*2]
mov word [ebx + edx*2], cx
mov edx, dword [esi + 0x62]
mov ecx, dword [esi + 0x52]
mov di, word [esi + 0x6a]
mov word [ecx + edx*2], di
mov ecx, dword [esi + 0x66]
dec ecx
mov dword [esi + 0x66], ecx
jne 0x438eb5
mov ebx, dword [esi + 0x6a]
xor ebp, ebp
inc ebx
mov edi, 2
test eax, eax
mov dword [esi + 0x6a], ebx
mov ecx, ebx
je 0x438fab
mov edx, dword [esi + 0x5a]
test edx, edx
jl 0x438f33
mov ebx, dword [esi + 0x4a]
mov eax, edx
add eax, ebx
jmp 0x438f35
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.00439c60
mov edx, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], edx
jmp 0x438fab
test ebp, ebp
je 0x438f98
mov eax, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
xor edx, edx
push esi
mov dl, byte [eax + ecx - 1]
push edx
push 0
call fcn.00439ee0
add esp, 0xc
test eax, eax
je 0x438f9d
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x438f7c
mov edx, dword [esi + 0x4a]
mov eax, ecx
add eax, edx
jmp 0x438f7e
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
jmp 0x438f9d
mov ebp, 1
mov ecx, dword [esi + 0x6a]
mov eax, dword [esi + 0x76]
inc ecx
dec eax
mov dword [esi + 0x6a], ecx
mov dword [esi + 0x76], eax
mov eax, dword [esi + 0x76]
mov ebx, 0x106
cmp eax, ebx
jae 0x438fce
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x438fce
push esi
call fcn.00438a90
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x438fb7
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x438dd0
test ebp, ebp
pop ebx
je 0x438ff6
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x4a]
xor eax, eax
push esi
mov al, byte [ecx + edx - 1]
push eax
push 0
call fcn.00439ee0
add esp, 0xc
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x439004
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x439006
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
ret