Function at 0x420370
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x7a79787f
mov dword [esp + 0x1c], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 7
ja 0x4203ce
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x18]
add eax, 0x6ea68513
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0x93
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 8
jb 0x4203a0
mov eax, dword [esp + 0x18]
mov ecx, dword [0x44d0a8]
test ecx, ecx
je 0x420424
xor edx, edx
mov esi, dword [0x44d0ac]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [esi + edx*8], 0xcecd21fd
je 0x420400
inc edx
cmp ecx, edx
jne 0x4203f0
jmp 0x420424
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x420424
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 5
push 4
push dword [0x44d0b0]
push ecx
call fcn.0043f8b0
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x4204c0
push dword [esp + 0x14]
call fcn.0043dab0
add esp, 4
mov ebp, eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], 0x7a79787f
mov dword [esp + 0x1c], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 7
ja 0x42048e
mov eax, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x18]
add eax, 0x6ea68513
xor eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0x93
mov edx, dword [esp]
mov byte [esp + edx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 8
jb 0x420460
mov eax, dword [esp + 0x18]
mov edx, dword [0x44d0a8]
test edx, edx
je 0x4204e6
xor esi, esi
mov edi, dword [0x44d0ac]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0xcecd21fd
je 0x4204c7
inc esi
cmp edx, esi
jne 0x4204b0
jmp 0x4204e6
xor ebx, ebx
jmp 0x4207ad
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
je 0x4204e6
push 0
push ecx
push ebp
push 5
push 4
push dword [0x44d0b0]
push edx
call fcn.0043f8b0
add esp, 0x1c
xor ebx, ebx
test eax, eax
js 0x4207a4
mov edi, dword [ebp]
mov eax, edi
mov ecx, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea edx, [ecx + eax]
dec ebx
mov eax, dword [ecx + eax]
mov ecx, edx
test eax, eax
jne 0x420500
mov eax, ebx
neg eax
mov ecx, eax
or ecx, 0x104
mov edx, eax
and edx, 0x104
imul edx, ecx
and eax, 0xfffffefb
dec ebx
and ebx, 0x104
imul ebx, eax
add ebx, edx
mov dword [esp + 0x10], ebp
jns 0x420542
mov ebx, 0xffffffff
jmp 0x420544
add ebx, ebx
push ebx
call fcn.00409a50
add esp, 4
mov ebp, eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
jmp 0x420572
mov esi, ebp
add eax, edi
lea ebp, [esi + 2]
mov word [esi], 0xa
mov edi, dword [eax]
test edi, edi
je 0x4205a3
mov ecx, dword [eax + edi + 0x3c]
movzx edx, word [ecx]
test dx, dx
je 0x420560
add ecx, 2
mov esi, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], dx
add esi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x420590
jmp 0x420562
xor ebx, ebx
mov eax, dword [esp + 4]
cmp ebp, eax
je 0x420797
mov word [ebp], 0
movzx ecx, word [eax]
test cx, cx
je 0x420604
xor ebx, ebx
mov eax, dword [esp + 4]
jmp 0x4205de
add ebx, edx
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x420604
cmp eax, ebp
jae 0x420604
movzx edi, cx
cmp edi, 0x800
mov ecx, 3
sbb ecx, 0
mov edx, 1
cmp edi, 0x80
jb 0x4205d0
mov edx, ecx
jmp 0x4205d0
mov eax, ebx
and eax, 1
mov ecx, ebx
xor ecx, 1
lea edi, [ecx + eax*2]
push edi
call fcn.00409a50
mov edx, edi
add esp, 4
lea ecx, [eax + edi]
dec ecx
mov edi, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x34], ecx
cmp eax, ecx
jae 0x420705
mov edi, dword [esp + 0xc]
cmp dword [esp + 4], ebp
jae 0x420705
mov edi, dword [esp + 0xc]
mov eax, edi
add eax, edx
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 4]
movzx edx, word [ebp]
test dx, dx
je 0x420705
cmp dx, 0x7f
ja 0x420670
mov byte [edi], dl
mov eax, 1
jmp 0x4206f0
mov ecx, edi
not ecx
add ecx, dword [esp + 0x30]
movzx eax, dx
cmp ecx, 2
jb 0x4206b0
cmp eax, 0x7ff
ja 0x4206b0
mov ecx, edx
shr ecx, 6
add cl, 0xc0
mov byte [edi], cl
and dl, 0x3f
or dl, 0x80
mov byte [edi + 1], dl
mov eax, 2
jmp 0x4206f0
mov dword [esp + 0x2c], eax
xor eax, eax
cmp ecx, 3
jb 0x4206f0
mov eax, dword [esp + 0x2c]
mov ecx, eax
shr ecx, 0xc
or cl, 0xe0
mov byte [edi], cl
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [edi + 1], al
and dl, 0x3f
or dl, 0x80
mov byte [edi + 2], dl
mov eax, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add edi, eax
cmp edi, dword [esp + 0x34]
jae 0x420705
lea ecx, [ebp + 2]
cmp ebp, esi
mov ebp, ecx
jb 0x420650
mov byte [edi], 0
mov dword [esp + 0x18], 0x40b5b350
mov dword [esp + 0x1c], 0x42bdbe41
mov dword [esp + 0x20], 0xb3b67fbb
mov dword [esp + 0x24], 0x55c8
mov byte [esp + 0x28], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x10
ja 0x42076e
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x18]
add eax, 0xa3ad0ab4
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0x6c
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x11
jb 0x420740
lea eax, [esp + 0x18]
mov ecx, dword [esp + 0x4c]
push ebx
mov esi, dword [esp + 0x10]
push esi
push eax
call fcn.0040a440
mov ebx, eax
push esi
call fcn.00409a60
add esp, 4
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 4]
jmp 0x42079b
mov ebp, dword [esp + 0x10]
push eax
call fcn.00409a60
add esp, 4
push ebp
call fcn.0043db40
add esp, 4
mov eax, ebx
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret