Function at 0x421fb0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [0x4c7100]
push ebx
mov ebx, dword [0x4c70fc]
push esi
xor esi, esi
mov dword [0x4c70dc], 2
test ebx, ebx
je 0x421f7b
mov ecx, dword [0x4c710c]
push edi
lea esp, [esp]
mov eax, dword [0x4c7110]
movzx eax, byte [edx + eax + 2]
mov edi, dword [0x4c7114]
shl ecx, 5
xor eax, ecx
mov ecx, dword [0x4c70e8]
and eax, 0x7fff
movzx ecx, word [ecx + eax*2]
and edx, 0x7fff
mov word [edi + edx*2], cx
mov edi, dword [0x4c70e8]
mov dx, word [0x4c7100]
mov word [edi + eax*2], dx
mov edi, dword [0x4c7100]
mov dword [0x4c710c], eax
test ecx, ecx
je 0x421e27
mov eax, edi
sub eax, ecx
cmp eax, 0x7efa
ja 0x421e27
push ecx
call fcn.00421b00
mov esi, eax
cmp esi, ebx
jbe 0x421e27
mov esi, ebx
cmp esi, 3
jb 0x421eef
sub edi, dword [0x4c70e4]
lea ecx, [esi - 3]
push ecx
push edi
call fcn.0046c9f0
sub dword [0x4c70fc], esi
cmp esi, dword [0x4c7104]
ja 0x421ebd
mov ecx, dword [0x4c710c]
dec esi
jmp 0x421e60
mov edx, dword [0x4c7100]
mov edi, dword [0x4c7110]
mov ebx, dword [0x4c7114]
inc edx
mov dword [0x4c7100], edx
movzx edi, byte [edx + edi + 2]
shl ecx, 5
xor edi, ecx
and edi, 0x7fff
mov ecx, edi
mov edi, dword [0x4c70e8]
mov di, word [edi + ecx*2]
and edx, 0x7fff
sub esi, 1
mov word [ebx + edx*2], di
mov dx, word [0x4c7100]
mov edi, dword [0x4c70e8]
mov word [edi + ecx*2], dx
jne 0x421e60
mov dword [0x4c710c], ecx
jmp 0x421f0c
mov edx, dword [0x4c7100]
mov edi, dword [0x4c7110]
add edx, esi
mov dword [0x4c7100], edx
movzx ecx, byte [edx + edi + 1]
movzx edi, byte [edx + edi]
shl edi, 5
xor ecx, edi
xor esi, esi
and ecx, 0x7fff
mov dword [0x4c710c], ecx
jmp 0x421f19
mov eax, dword [0x4c7110]
movzx ecx, byte [edi + eax]
push ecx
push 0
call fcn.0046c9f0
dec dword [0x4c70fc]
mov ecx, dword [0x4c710c]
mov edx, dword [0x4c7100]
inc edx
mov dword [0x4c7100], edx
test eax, eax
je 0x421f4f
mov ecx, dword [0x4c70f8]
test ecx, ecx
jl 0x421f30
mov eax, dword [0x4c7110]
add eax, ecx
jmp 0x421f32
xor eax, eax
push 0
sub edx, ecx
push edx
push eax
call fcn.0046d7d0
mov edx, dword [0x4c7100]
mov ecx, dword [0x4c710c]
mov dword [0x4c70f8], edx
cmp dword [0x4c70fc], 0x106
jae 0x421f6c
call fcn.00421c50
mov ecx, dword [0x4c710c]
mov edx, dword [0x4c7100]
mov ebx, dword [0x4c70fc]
test ebx, ebx
jne 0x421dc0
pop edi
mov ecx, dword [0x4c70f8]
pop esi
pop ebx
test ecx, ecx
jl 0x421f9a
mov eax, dword [0x4c7110]
push 1
sub edx, ecx
add eax, ecx
push edx
push eax
call fcn.0046d7d0
ret
push 1
sub edx, ecx
xor eax, eax
push edx
push eax
call fcn.0046d7d0
ret
sub esp, 8
cmp dword [str.SelectObject], 3
push ebp
mov dword [esp + 4], 0
mov ebp, 2
jg 0x421fd3
pop ebp
add esp, 8
jmp 0x421d90
cmp dword [0x4c70fc], 0
push esi
mov esi, dword [0x4c7100]
je 0x4222a2
push ebx
push edi
mov edi, dword [0x4c710c]
nop
mov eax, dword [0x4c7110]
movzx ecx, byte [esi + eax + 2]
mov edx, dword [0x4c70e8]
shl edi, 5
xor ecx, edi
and ecx, 0x7fff
mov edi, ecx
movzx eax, word [edx + edi*2]
mov ecx, dword [0x4c7114]
and esi, 0x7fff
mov word [ecx + esi*2], ax
mov ecx, dword [0x4c70e8]
mov dx, word [0x4c7100]
mov word [ecx + edi*2], dx
mov ecx, dword [0x4c70e4]
mov esi, dword [0x4c7100]
mov ebx, ebp
mov dword [0x4c710c], edi
mov dword [0x4c70dc], ebx
mov dword [esp + 0x14], ecx
mov ebp, 2
test eax, eax
je 0x42209b
cmp ebx, dword [0x4c7104]
jae 0x42209b
mov edx, esi
sub edx, eax
cmp edx, 0x7efa
ja 0x42209b
push eax
call fcn.00421b00
mov ebp, eax
mov eax, dword [0x4c70fc]
cmp ebp, eax
jbe 0x422080
mov ebp, eax
mov ecx, dword [0x4c70e4]
cmp ebp, 3
jne 0x42209b
mov eax, esi
sub eax, ecx
cmp eax, 0x1000
jbe 0x42209b
mov ebp, 2
cmp ebx, 3
jb 0x4221cb
cmp ebp, ebx
jbe 0x4220d4
mov edx, ebp
sub edx, ebx
cmp edx, 1
jne 0x4221cb
mov eax, esi
sub eax, ecx
cmp eax, 0x4000
jbe 0x4221cb
add ecx, 0x5dc
cmp ecx, dword [esp + 0x14]
jae 0x4221cb
sub esi, dword [esp + 0x14]
add ebx, 0xfffffffd
push ebx
dec esi
push esi
call fcn.0046c9f0
mov ecx, dword [0x4c70dc]
mov edi, dword [0x4c710c]
mov edx, 1
mov esi, edx
sub esi, ecx
add dword [0x4c70fc], esi
sub ecx, 2
mov dword [0x4c70dc], ecx
jmp 0x422110
mov ecx, dword [0x4c7100]
mov esi, dword [0x4c7110]
mov ebx, dword [0x4c7114]
add ecx, edx
mov dword [0x4c7100], ecx
movzx esi, byte [ecx + esi + 2]
shl edi, 5
xor esi, edi
and esi, 0x7fff
mov edi, esi
mov esi, dword [0x4c70e8]
mov si, word [esi + edi*2]
and ecx, 0x7fff
mov word [ebx + ecx*2], si
mov cx, word [0x4c7100]
mov esi, dword [0x4c70e8]
mov word [esi + edi*2], cx
sub dword [0x4c70dc], edx
jne 0x422110
mov esi, dword [0x4c7100]
add esi, edx
mov dword [0x4c710c], edi
mov dword [esp + 0x10], 0
mov ebp, 2
mov dword [0x4c7100], esi
test eax, eax
je 0x422257
mov ecx, dword [0x4c70f8]
test ecx, ecx
jl 0x4221a7
mov edx, dword [0x4c7110]
lea eax, [ecx + edx]
jmp 0x4221a9
xor eax, eax
push 0
sub esi, ecx
push esi
push eax
call fcn.0046d7d0
mov esi, dword [0x4c7100]
mov edi, dword [0x4c710c]
mov dword [0x4c70f8], esi
jmp 0x422257
cmp dword [esp + 0x10], 0
je 0x422240
mov eax, dword [0x4c7110]
movzx ecx, byte [esi + eax - 1]
push ecx
push 0
call fcn.0046c9f0
test eax, eax
je 0x42222b
mov ecx, dword [0x4c70f8]
test ecx, ecx
jl 0x4221fd
mov edx, dword [0x4c7110]
lea eax, [ecx + edx]
jmp 0x4221ff
xor eax, eax
mov edx, dword [0x4c7100]
push 0
sub edx, ecx
push edx
push eax
call fcn.0046d7d0
mov esi, dword [0x4c7100]
mov edi, dword [0x4c710c]
mov dword [0x4c70f8], esi
inc esi
dec dword [0x4c70fc]
jmp 0x422251
mov esi, dword [0x4c7100]
mov edi, dword [0x4c710c]
inc esi
dec dword [0x4c70fc]
jmp 0x422251
mov eax, 1
add esi, eax
sub dword [0x4c70fc], eax
mov dword [esp + 0x10], eax
mov dword [0x4c7100], esi
cmp dword [0x4c70fc], 0x106
jae 0x422274
call fcn.00421c50
mov edi, dword [0x4c710c]
mov esi, dword [0x4c7100]
cmp dword [0x4c70fc], 0
jne 0x421ff0
cmp dword [esp + 0x10], 0
pop edi
pop ebx
je 0x4222a2
mov eax, dword [0x4c7110]
movzx ecx, byte [esi + eax - 1]
push ecx
push 0
call fcn.0046c9f0
mov esi, dword [0x4c7100]
mov ecx, dword [0x4c70f8]
test ecx, ecx
jl 0x4222c6
mov edx, dword [0x4c7110]
push 1
sub esi, ecx
lea eax, [ecx + edx]
push esi
push eax
call fcn.0046d7d0
pop esi
pop ebp
add esp, 8
ret
push 1
sub esi, ecx
xor eax, eax
push esi
push eax
call fcn.0046d7d0
pop esi
pop ebp
add esp, 8
ret