Function at 0x422620
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x150
cmp byte [ebp + 0x18], 0
je 0x4226e6
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
lea ebx, [esp + 0x28]
push 0x120
push 0
push ebx
call fcn.0040c560
add esp, 0xc
mov ecx, esi
push 0
push 0
push 0x120
push ebx
push edi
push dword [ebp + 0xc]
call fcn.0043dfe0
xor ebx, ebx
test eax, eax
js 0x422b2e
mov dword [esp + 4], 0x666f606e
mov byte [esp + 8], 4
mov word [esp + 9], 0
mov byte [esp + 0xb], 0
nop
nop
nop
nop
nop
movzx eax, byte [esp + ebx + 4]
lea ecx, [ebx - 0x68f1b680]
lea edx, [eax + eax]
not edx
add edx, eax
and edx, ecx
mov ecx, ebx
xor ecx, 0x7f
and ecx, eax
or ecx, edx
lea eax, [ecx + ecx]
xor ecx, 0x80
sub eax, ecx
mov byte [esp + ebx + 4], al
inc ebx
cmp ebx, 8
jne 0x422690
cmp byte [esp + 0x47], 0
js 0x4226ed
lea eax, [esp + 0x30]
lea ecx, [esp + 4]
push eax
push ecx
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
mov al, 1
mov dword [esp + 0x14], eax
jmp 0x42274a
xor ebx, ebx
jmp 0x422b2e
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov eax, esi
or eax, ebx
je 0x422742
mov edi, dword [esp + 0x38]
inc edi
push edi
call fcn.0040c4e0
add esp, 4
mov ecx, dword [ebp + 8]
push 0
push 0
push edi
mov edi, eax
push eax
push ebx
push esi
call fcn.0043dfe0
test eax, eax
setns al
mov dword [esp + 0x14], eax
js 0x422737
lea eax, [esp + 4]
push edi
push eax
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
push edi
call fcn.0040c4f0
add esp, 4
jmp 0x42274a
mov dword [esp + 0x14], 0
mov dword [esp + 4], 0x7e72647a
mov word [esp + 8], 0x36f
mov dword [esp + 0xa], 0
mov byte [esp + 0xe], 0
mov edi, 0x845ad81
mov esi, 0x37ba527e
movzx ebx, byte [esp + edi - 0x845ad7d]
mov ecx, esi
and ecx, 0x23825226
mov eax, edi
and eax, 0x8412099
or eax, ecx
xor eax, ebx
mov edx, eax
xor edx, 0x26
add eax, eax
xor eax, 0x4d
sub edx, eax
and edx, edi
mov eax, edx
or al, 0xfd
inc al
mov ecx, edx
and cl, 0x9d
mul cl
mov ecx, eax
add cl, bl
mov eax, edx
shr al, 1
and al, 1
or dl, 2
mul dl
add al, al
sub cl, al
movzx eax, cl
add eax, edi
add al, 0x7b
mov byte [esp + edi - 0x845ad7d], al
inc edi
dec esi
cmp edi, 0x845ad8c
jne 0x422770
cmp byte [esp + 0x127], 0
js 0x4227fa
lea eax, [esp + 0x110]
lea ecx, [esp + 4]
push eax
push ecx
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
mov edi, 1
jmp 0x42285a
mov esi, dword [esp + 0x110]
mov edi, dword [esp + 0x114]
mov eax, esi
or eax, edi
je 0x422858
mov ebx, dword [esp + 0x118]
inc ebx
push ebx
call fcn.0040c4e0
add esp, 4
mov ecx, dword [ebp + 8]
push 0
push 0
push ebx
mov ebx, eax
push eax
push edi
push esi
call fcn.0043dfe0
mov edi, eax
test eax, eax
js 0x422848
lea eax, [esp + 4]
push ebx
push eax
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
push ebx
call fcn.0040c4f0
add esp, 4
not edi
shr edi, 0x1f
jmp 0x42285a
xor edi, edi
movzx esi, byte [esp + 0x14]
not esi
or edi, esi
mov dword [esp + 4], 0x50b0e04
mov dword [esp + 8], 0x1e350e31
mov byte [esp + 0xc], 0x94
mov dword [esp + 0xd], 0
mov eax, 0xa5
mov ecx, 0x5a
nop
nop
nop
nop
nop
nop
movzx ebx, byte [esp + eax - 0xa1]
mov edx, ecx
xor edx, eax
and edx, ebx
xor edx, eax
add dl, 0xc7
mov byte [esp + eax - 0xa1], dl
inc eax
dec ecx
cmp eax, 0xb2
jne 0x422890
cmp byte [esp + 0x5f], 0
js 0x4228d3
lea eax, [esp + 0x48]
lea ecx, [esp + 4]
push eax
push ecx
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
mov al, 1
jmp 0x42293e
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov eax, ecx
or eax, edx
je 0x42293c
mov ebx, dword [esp + 0x50]
inc ebx
push ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
call fcn.0040c4e0
add esp, 4
mov ecx, dword [ebp + 8]
push 0
push 0
push ebx
mov dword [esp + 0x20], eax
push eax
push dword [esp + 0x28]
push dword [esp + 0x30]
call fcn.0043dfe0
test eax, eax
setns bl
js 0x42292c
lea eax, [esp + 4]
push dword [esp + 0x14]
push eax
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
push dword [esp + 0x14]
call fcn.0040c4f0
add esp, 4
mov eax, ebx
jmp 0x42293e
xor eax, eax
cmp edi, esi
setne bl
mov dword [esp + 4], 0x7f6a6878
mov byte [esp + 8], 0xd4
mov dword [esp + 9], 0
mov word [esp + 0xd], 0
and bl, al
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0x2e
xor cl, byte [esp + eax + 4]
add cl, 0x1a
mov byte [esp + eax + 4], cl
inc eax
cmp eax, 0xb
jne 0x422970
cmp byte [esp + 0x77], 0
js 0x4229a6
lea eax, [esp + 0x60]
lea ecx, [esp + 4]
push eax
push ecx
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
mov al, 1
jmp 0x422a04
mov ecx, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov eax, ecx
or eax, edi
je 0x422a02
mov esi, dword [esp + 0x68]
inc esi
push esi
mov dword [esp + 0x18], ecx
call fcn.0040c4e0
add esp, 4
mov ecx, dword [ebp + 8]
push 0
push 0
push esi
mov esi, eax
push eax
push edi
push dword [esp + 0x28]
call fcn.0043dfe0
test eax, eax
setns al
mov edi, eax
js 0x4229f5
lea eax, [esp + 4]
push esi
push eax
push dword [ebp + 0x14]
call fcn.00405bf0
add esp, 0xc
push esi
call fcn.0040c4f0
add esp, 4
mov eax, edi
jmp 0x422a04
xor eax, eax
and bl, al
mov esi, dword [esp + 0x128]
mov ecx, dword [esp + 0x12c]
mov dword [esp + 4], 0x5e6691a5
mov dword [esp + 8], 0x506d586a
mov dword [esp + 0xc], 0xff516d6d
mov byte [esp + 0x10], 0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, edx
add al, 0x7e
xor al, byte [esp + edx + 4]
add al, 0x8a
mov byte [esp + edx + 4], al
inc edx
cmp edx, 0xd
jne 0x422a40
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ecx
fild qword [esp + 0x20]
sub esp, 0x10
lea edi, [esp + 0x14]
mov dword [esp + 4], edi
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
fstp qword [esp + 8]
call fcn.00405c40
add esp, 0x10
mov esi, eax
movzx eax, byte [esp + 0x80]
mov dword [esp + 4], 0xac47aabf
mov dword [esp + 8], 0xcfadbebf
mov dword [esp + 0xc], 0x5fc3
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, ecx
add dl, 0xb9
xor dl, byte [esp + ecx + 4]
add dl, 0x63
mov byte [esp + ecx + 4], dl
inc ecx
cmp ecx, 0xc
jne 0x422ab0
push eax
push edi
push dword [ebp + 0x14]
call fcn.00405cd0
add esp, 0xc
mov edi, eax
movzx eax, byte [esp + 0x81]
mov dword [esp + 4], 0xc1cacbc4
mov dword [esp + 8], 0xc9ccc2d1
mov dword [esp + 0xc], 0x37bf
or edi, esi
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
mov edx, ecx
add dl, 0x75
xor dl, byte [esp + ecx + 4]
add dl, 0xb7
mov byte [esp + ecx + 4], dl
inc ecx
cmp ecx, 0xc
jne 0x422b00
push eax
lea eax, [esp + 8]
push eax
push dword [ebp + 0x14]
call fcn.00405cd0
add esp, 0xc
or edi, eax
sete al
and bl, al
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret