Function at 0x4229c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
jne 0x4229dc
lea eax, [esi - 0x66]
pop esi
add esp, 8
ret
push ebx
mov ebx, dword [esi + 0x7c]
test ebx, ebx
jne 0x4229ed
lea eax, [ebx - 0x66]
pop ebx
pop esi
add esp, 8
ret
cmp dword [ebx], 0
jne 0x4229fd
pop ebx
mov eax, 0xffffff9c
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x14], 0x2000
cmp eax, 0x2000
jae 0x422a1e
cmp dword [ebx + 0x6c], 0
jne 0x422a1e
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx + 0x58]
mov edx, dword [ebx + 8]
lea eax, [ecx + edx]
cmp eax, 0x2000
jae 0x422a37
cmp dword [ebx + 0x6c], 0
je 0x422a37
mov dword [ebx + 0x14], eax
cmp dword [ebx + 0x14], 0
push ebp
push edi
jbe 0x422bcf
cmp dword [ebx + 8], 0
jne 0x422af7
mov eax, dword [ebx + 0x58]
test eax, eax
jbe 0x422af7
mov edi, 0x4000
mov dword [esp + 0x14], edi
cmp eax, edi
jae 0x422a6b
mov dword [esp + 0x14], eax
mov edi, eax
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, dword [ebx + 0x68]
mov edx, dword [ebx]
add ecx, dword [ebx + 0x3c]
push edi
push ecx
push edx
call fcn.00469530
add esp, 0xc
cmp dword [esi + 0x80], 0
je 0x422ae9
xor ebp, ebp
test edi, edi
jbe 0x422ae9
add esi, 0x84
jmp 0x422aa0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x8c]
mov edx, dword [ebx]
and eax, 0xfffd
lea edi, [edx + ebp]
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor byte [edi], dl
mov eax, dword [ebx]
movsx eax, byte [eax + ebp]
mov edi, dword [ecx + 0x90]
call fcn.00421f20
mov ecx, dword [ebx]
mov byte [ecx + ebp], al
inc ebp
cmp ebp, dword [esp + 0x14]
jb 0x422aa0
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov edx, dword [ebx]
add dword [ebx + 0x3c], edi
sub dword [ebx + 0x58], edi
mov dword [ebx + 4], edx
mov dword [ebx + 8], edi
cmp dword [ebx + 0x64], 0
je 0x422b64
cmp dword [ebx + 0x6c], 0
jne 0x422b64
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx + 0x10]
lea ecx, [ebx + 4]
push ecx
mov dword [esp + 0x18], eax
call fcn.0041ee60
mov ebp, eax
add esp, 4
test ebp, ebp
jl 0x422b2a
cmp dword [ebx + 0x1c], 0
je 0x422b2a
mov ebp, 0xfffffffd
mov edi, dword [ebx + 0x18]
sub edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x50]
test esi, esi
jne 0x422b3c
xor eax, eax
jmp 0x422b47
push edi
mov ecx, esi
call fcn.0041d810
add esp, 4
sub dword [ebx + 0x5c], edi
add dword [esp + 0x10], edi
mov dword [ebx + 0x50], eax
cmp ebp, 1
je 0x422bcf
test ebp, ebp
jne 0x422bdb
mov esi, dword [esp + 0x1c]
jmp 0x422bc5
mov eax, dword [ebx + 8]
test eax, eax
jne 0x422b70
cmp dword [ebx + 0x58], eax
je 0x422bcf
mov edi, dword [ebx + 0x14]
cmp edi, eax
jb 0x422b79
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x422b91
nop
mov edx, dword [ebx + 4]
mov dl, byte [eax + edx]
mov ecx, dword [ebx + 0x10]
mov byte [eax + ecx], dl
inc eax
cmp eax, edi
jb 0x422b80
mov ebp, dword [ebx + 0x10]
mov eax, dword [ebx + 0x50]
test ebp, ebp
jne 0x422b9f
xor eax, eax
jmp 0x422baa
push edi
mov ecx, ebp
call fcn.0041d810
add esp, 4
sub dword [ebx + 0x5c], edi
sub dword [ebx + 8], edi
sub dword [ebx + 0x14], edi
add dword [ebx + 4], edi
add dword [ebx + 0x18], edi
add ebp, edi
add dword [esp + 0x10], edi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x10], ebp
cmp dword [ebx + 0x14], 0
ja 0x422a43
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
pop edi
mov eax, ebp
pop ebp
pop ebx
pop esi
add esp, 8
ret