Function at 0x420030
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov dword [esp + 0x28], 0
mov dword [esp + 0xc], 0x5e59585b
mov word [esp + 0x10], 0
mov byte [esp + 0x12], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 6
ja 0x42009e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0xc]
add eax, 0xdffcae61
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0xc5
mov ecx, dword [esp]
mov byte [esp + ecx + 0xc], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 7
jb 0x420070
mov eax, dword [esp + 0xc]
mov ecx, dword [0x449d78]
test ecx, ecx
je 0x4200f4
xor edx, edx
mov esi, dword [0x449d7c]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [esi + edx*8], 0xcecd21fd
je 0x4200d0
inc edx
cmp ecx, edx
jne 0x4200c0
jmp 0x4200f4
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x4200f4
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 5
push 4
push dword [0x449d80]
push ecx
call fcn.0043c880
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x4201a0
push dword [esp + 0x28]
call fcn.0043a8a0
add esp, 4
mov ebp, eax
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc], 0x5e59585b
mov word [esp + 0x10], 0
mov byte [esp + 0x12], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 6
ja 0x42016e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0xc]
add eax, 0xdffcae61
xor eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0xc5
mov edx, dword [esp]
mov byte [esp + edx + 0xc], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 7
jb 0x420140
mov eax, dword [esp + 0xc]
mov edx, dword [0x449d78]
test edx, edx
je 0x4201c6
xor esi, esi
mov edi, dword [0x449d7c]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0xcecd21fd
je 0x4201a7
inc esi
cmp edx, esi
jne 0x420190
jmp 0x4201c6
xor ebx, ebx
jmp 0x42049d
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
je 0x4201c6
push 0
push ecx
push ebp
push 5
push 4
push dword [0x449d80]
push edx
call fcn.0043c880
add esp, 0x1c
xor ebx, ebx
test eax, eax
js 0x420494
mov edi, dword [ebp]
mov eax, edi
mov ecx, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea edx, [ecx + eax]
mov eax, dword [ecx + eax]
dec ebx
mov ecx, edx
test eax, eax
jne 0x4201e0
lea eax, [ebx - 1]
and eax, 0x104
neg ebx
mov ecx, ebx
and ecx, 0xfffffefb
imul ecx, eax
mov eax, ebx
and eax, 0x104
or ebx, 0x104
imul ebx, eax
add ebx, ecx
mov dword [esp + 0x24], ebp
jns 0x420221
mov ebx, 0xffffffff
jmp 0x420223
add ebx, ebx
push ebx
call fcn.00409840
add esp, 4
mov ebp, eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
jmp 0x420252
mov esi, ebp
add eax, edi
lea ebp, [esi + 2]
mov word [esi], 0xa
mov edi, dword [eax]
test edi, edi
je 0x420283
mov ecx, dword [eax + edi + 0x3c]
movzx edx, word [ecx]
test dx, dx
je 0x420240
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 0x420270
jmp 0x420242
xor ebx, ebx
mov eax, dword [esp + 4]
cmp ebp, eax
je 0x420487
mov word [ebp], 0
movzx ecx, word [eax]
test cx, cx
je 0x4202e4
xor ebx, ebx
mov eax, dword [esp + 4]
jmp 0x4202be
add ebx, edx
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x4202e4
cmp eax, ebp
jae 0x4202e4
movzx edi, cx
cmp edi, 0x800
mov ecx, 3
sbb ecx, 0
mov edx, 1
cmp edi, 0x80
jb 0x4202b0
mov edx, ecx
jmp 0x4202b0
lea eax, [ebx + 1]
mov dword [esp + 0x2c], eax
push eax
call fcn.00409840
add esp, 4
mov edx, eax
mov dword [esp + 0x20], eax
test ebx, ebx
jle 0x4203e5
mov edx, dword [esp + 0x20]
cmp dword [esp + 4], ebp
jae 0x4203e5
mov edx, dword [esp + 0x20]
lea eax, [edx + ebx]
mov dword [esp + 0x34], eax
add dword [esp + 0x2c], edx
mov ebp, dword [esp + 4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp]
test cx, cx
je 0x4203e5
cmp cx, 0x7f
ja 0x420350
mov byte [edx], cl
mov edi, 1
jmp 0x4203d0
mov eax, edx
not eax
add eax, dword [esp + 0x2c]
movzx edi, cx
cmp eax, 2
jb 0x420390
cmp edi, 0x7ff
ja 0x420390
mov eax, ecx
shr eax, 6
add al, 0xc0
mov byte [edx], al
and cl, 0x3f
or cl, 0x80
mov byte [edx + 1], cl
mov edi, 2
jmp 0x4203d0
mov dword [esp + 0x30], edi
xor edi, edi
cmp eax, 3
jb 0x4203d0
mov edi, dword [esp + 0x30]
mov eax, edi
shr eax, 0xc
or al, 0xe0
mov byte [edx], al
mov eax, edi
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [edx + 1], al
and cl, 0x3f
or cl, 0x80
mov byte [edx + 2], cl
mov edi, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add edx, edi
cmp edx, dword [esp + 0x34]
jae 0x4203e5
lea eax, [ebp + 2]
cmp ebp, esi
mov ebp, eax
jb 0x420330
mov byte [edx], 0
mov dword [esp + 0xc], 0x3c332d14
mov dword [esp + 0x10], 0x613123b
mov dword [esp + 0x14], 0x11164911
mov word [esp + 0x18], 0x9714
mov dword [esp + 0x1a], 0
mov byte [esp + 0x1e], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x12
ja 0x42045e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0xc]
add eax, 0xf91919db
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0x81
mov ecx, dword [esp]
mov byte [esp + ecx + 0xc], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x13
jb 0x420430
lea eax, [esp + 0xc]
mov ecx, dword [esp + 0x4c]
push ebx
mov esi, dword [esp + 0x24]
push esi
push eax
call fcn.0040a250
mov ebx, eax
push esi
call fcn.00409850
add esp, 4
mov ebp, dword [esp + 0x24]
mov eax, dword [esp + 4]
jmp 0x42048b
mov ebp, dword [esp + 0x24]
push eax
call fcn.00409850
add esp, 4
push ebp
call fcn.0043a910
add esp, 4
mov eax, ebx
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret