Function at 0x420249
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x420253
mov eax, dword [esp + 0x2000]
add esp, 0xfffffb54
mov edi, eax
mov eax, 0xdc6
mov dword [esp], edx
call fcn.0040c264
push eax
call fcn.00422428
pop ecx
xor edx, edx
mov eax, edi
call fcn.00407b10
test al, al
je 0x4202bb
cmp byte [edi + 0x57cb], 0
jne 0x4202bb
push 0
push 0
xor edx, edx
mov eax, edi
call fcn.00402f08
mov eax, 0xdc8
call fcn.0040c264
push eax
call fcn.00422428
pop ecx
xor eax, eax
jmp 0x420bb4
lea eax, [esp + 0x70]
mov edx, edi
call fcn.00402818
mov edx, 0x439f5a
mov eax, edi
call fcn.00407f5c
test eax, eax
je 0x42033a
lea eax, [esp + 0x7c]
xor edx, edx
call fcn.0040bbc8
mov ecx, dword [edi + 0x4ac0]
mov edx, dword [edi + 0x4abc]
lea eax, [esp + 0x7c]
call fcn.0040bc7c
lea edx, [esp + 0x14]
lea eax, [esp + 0x7c]
mov ecx, 8
call fcn.0040bd5c
lea edx, [esp + 4]
lea eax, [esp + 0x7c]
call fcn.0040bce0
lea edx, [esp + 8]
lea eax, [esp + 0x7c]
call fcn.0040bd18
mov byte [esp + 0x10], 1
lea eax, [esp + 0x7c]
mov edx, 2
call fcn.004022a0
jmp 0x42062d
mov eax, dword [edi + 0x57d0]
xor edx, edx
push edx
push eax
xor edx, edx
mov eax, edi
call fcn.00402f08
mov edx, 0x78
mov eax, edi
call fcn.00407f1c
test eax, eax
je 0x420392
mov cx, word [edi + 0x57d6]
cmp cx, word [edi + 0x4af4]
jne 0x420392
movzx eax, word [edi + 0x4b06]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x4b08]
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov byte [esp + 0x10], 0
jmp 0x42062d
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [edi + 0x57b4], 0
mov dword [edi + 0x57b8], 0
push dword [esp + 0x20]
push dword [esp + 0x20]
xor edx, edx
mov eax, edi
call fcn.00402f08
lea edx, [esp + 0x98]
mov ecx, 0x2000
mov eax, edi
call fcn.00402dcc
mov ebp, eax
test ebp, ebp
je 0x4205e6
xor esi, esi
jmp 0x4205c4
lea ebx, [esp + 0x98]
add ebx, esi
cmp byte [ebx + 2], 0x7a
jne 0x42050c
push 8
push str.Protect
lea eax, [ebx + 0x22]
push eax
call fcn.004304a8
add esp, 0xc
test eax, eax
jne 0x42050c
xor ecx, ecx
xor edx, edx
mov cl, byte [ebx + 1]
mov dl, byte [ebx]
shl ecx, 8
add dx, cx
mov ecx, 0x34
not dx
and dx, 0xffff
or eax, 0xffffffff
mov word [esp + 0x24], dx
lea edx, [ebx + 2]
call fcn.00409ab4
and eax, 0xffff
movzx edx, word [esp + 0x24]
cmp eax, edx
jne 0x4205c3
xor ecx, ecx
xor eax, eax
mov cl, byte [ebx + 0x2b]
mov al, byte [ebx + 0x2a]
shl ecx, 8
xor edx, edx
add eax, ecx
mov dl, byte [ebx + 0x2c]
xor ecx, ecx
mov cl, byte [ebx + 0x2d]
shl edx, 0x10
shl ecx, 0x18
add eax, edx
add eax, ecx
xor edx, edx
mov dword [esp + 4], eax
xor eax, eax
mov dl, byte [ebx + 0x2f]
mov al, byte [ebx + 0x2e]
shl edx, 8
xor ecx, ecx
add eax, edx
mov cl, byte [ebx + 0x30]
xor edx, edx
mov dl, byte [ebx + 0x31]
shl ecx, 0x10
shl edx, 0x18
add eax, ecx
add eax, edx
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
xor edx, edx
xor eax, eax
mov dl, byte [ebx + 0x33]
mov al, byte [ebx + 0x32]
shl edx, 8
xor ecx, ecx
add eax, edx
mov cl, byte [ebx + 0x34]
xor edx, edx
mov dl, byte [ebx + 0x35]
shl ecx, 0x10
shl edx, 0x18
add eax, ecx
add eax, edx
xor edx, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x28]
xor eax, eax
add dword [esp + 8], eax
adc dword [esp + 0xc], edx
mov eax, esi
cdq
add eax, dword [esp + 0x1c]
adc edx, dword [esp + 0x20]
mov dword [edi + 0x57b4], eax
mov dword [edi + 0x57b8], edx
mov byte [esp + 0x10], 1
jmp 0x4205d4
cmp byte [ebx + 2], 0x78
jne 0x4205c3
push 8
push str.Protect_
lea ecx, [ebx + 0x12]
push ecx
call fcn.004304a8
add esp, 0xc
test eax, eax
jne 0x4205c3
xor edx, edx
xor eax, eax
mov dl, byte [ebx + 1]
mov al, byte [ebx]
shl edx, 8
mov ecx, 0x18
add eax, edx
lea edx, [ebx + 2]
not eax
and eax, 0xffff
mov dword [esp + 0x30], eax
or eax, 0xffffffff
call fcn.00409ab4
and eax, 0xffff
cmp eax, dword [esp + 0x30]
jne 0x4205c3
xor edx, edx
xor eax, eax
mov dl, byte [ebx + 0xd]
mov al, byte [ebx + 0xc]
shl edx, 8
xor ecx, ecx
add eax, edx
xor edx, edx
mov dword [esp + 4], eax
xor eax, eax
mov dl, byte [ebx + 0xf]
mov al, byte [ebx + 0xe]
shl edx, 8
mov cl, byte [ebx + 0x10]
add eax, edx
xor edx, edx
mov dl, byte [ebx + 0x11]
shl ecx, 0x10
shl edx, 0x18
add eax, ecx
add eax, edx
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, esi
cdq
add eax, dword [esp + 0x1c]
adc edx, dword [esp + 0x20]
mov dword [edi + 0x57b4], eax
mov dword [edi + 0x57b8], edx
mov byte [esp + 0x10], 0
jmp 0x4205d4
inc esi
mov ecx, ebp
sub ecx, 0x20
sub ecx, 0x12
cmp ecx, esi
ja 0x4203eb
add dword [esp + 0x1c], 0x1fce
adc dword [esp + 0x20], 0
jmp 0x4203b6
cmp dword [edi + 0x57b8], 0
jne 0x42062d
cmp dword [edi + 0x57b4], 0
jne 0x42062d
push 0
push 0
xor edx, edx
mov eax, edi
call fcn.00402f08
mov eax, 0xdc8
call fcn.0040c264
push eax
call fcn.00422428
pop ecx
xor eax, eax
push eax
lea eax, [esp + 0x74]
mov edx, 2
call fcn.00402834
pop eax
jmp 0x420bb4
mov eax, 0xdca
call fcn.0040c264
push eax
call fcn.00422428
pop ecx
mov edx, dword [edi + 0x57b4]
mov dword [esp + 0x34], edx
xor eax, eax
mov edx, dword [edi + 0x57b8]
mov dword [esp + 0x38], edx
mov ecx, dword [edi + 0x57b4]
mov dword [esp + 0x3c], ecx
mov ecx, dword [edi + 0x57b8]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
mov edx, dword [esp + 4]
lea eax, [esp + 0x2298]
shl edx, 9
call fcn.004032b4
push dword [esp + 0x229c]
push 0
push dword [esp + 0x22a0]
call fcn.004301c0
add esp, 0xc
xor edx, edx
mov eax, edi
push 0
push 0
call fcn.00402f08
jmp 0x42074f
call fcn.004096f8
cmp dword [esp + 0x38], 0
jne 0x4206c1
cmp dword [esp + 0x34], 0x200
jae 0x4206f7
jmp 0x4206c3
jge 0x4206f7
mov eax, dword [esp + 0x34]
mov ebx, eax
mov eax, pe_nt_image_headers32
sub eax, ebx
push eax
push 0
lea edx, [esp + 0x20a0]
add edx, ebx
push edx
call fcn.004301c0
add esp, 0xc
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
jmp 0x420709
sub dword [esp + 0x34], 0x200
sbb dword [esp + 0x38], 0
mov ebx, pe_nt_image_headers32
lea edx, [esp + 0x2098]
mov ecx, ebx
mov eax, edi
call fcn.00402dcc
mov edx, dword [esp + 0x44]
shl edx, 9
add edx, dword [esp + 0x2298]
xor eax, eax
mov cl, byte [esp + eax + 0x2098]
xor byte [edx + eax], cl
inc eax
cmp eax, 0x200
jl 0x420729
inc dword [esp + 0x44]
mov eax, dword [esp + 0x44]
cmp eax, dword [esp + 4]
jb 0x42074f
xor edx, edx
mov dword [esp + 0x44], edx
cmp dword [esp + 0x38], 0
jne 0x420763
cmp dword [esp + 0x34], 0
ja 0x4206a9
jmp 0x420769
jg 0x4206a9
cmp byte [esp + 0x10], 0
je 0x420777
mov ecx, 0x36
jmp 0x42077c
mov ecx, 0x1a
mov dword [esp + 0x48], ecx
cmp byte [edi + 0x57cc], 0
je 0x42079a
mov eax, dword [esp + 0x48]
not eax
inc eax
and eax, 0xf
add eax, 8
add dword [esp + 0x48], eax
mov eax, dword [esp + 0x48]
cdq
add eax, dword [esp + 0x3c]
adc edx, dword [esp + 0x40]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], edx
push 0
push 2
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
call fcn.0043329c
add eax, dword [esp + 0x4c]
adc edx, dword [esp + 0x50]
push edx
push eax
xor edx, edx
mov eax, edi
call fcn.00402f08
xor ebx, ebx
jmp 0x42080b
lea edx, [esp + 0x2098]
mov ecx, pe_nt_image_headers32
mov eax, edi
call fcn.00402dcc
mov edx, ebx
shl edx, 9
add edx, dword [esp + 0x2298]
xor eax, eax
mov cl, byte [esp + eax + 0x2098]
xor byte [edx + eax], cl
inc eax
cmp eax, 0x200
jl 0x4207f8
inc ebx
cmp ebx, dword [esp + 4]
jb 0x4207d7
push 0
push 0
xor edx, edx
mov eax, edi
call fcn.00402f08
mov ecx, dword [esp + 0x4c]
xor edx, edx
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x58], ecx
xor ecx, ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x38], eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], ecx
xor eax, eax
mov dword [esp + 0x44], eax
jmp 0x420b36
call fcn.004096f8
cmp dword [esp + 0x38], 0
jne 0x42086d
cmp dword [esp + 0x34], 0x200
jae 0x4208a3
jmp 0x42086f
jge 0x4208a3
mov eax, dword [esp + 0x34]
mov ebx, eax
mov eax, pe_nt_image_headers32
sub eax, ebx
push eax
push 0
lea edx, [esp + 0x20a0]
add edx, ebx
push edx
call fcn.004301c0
add esp, 0xc
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
jmp 0x4208b5
sub dword [esp + 0x34], 0x200
sbb dword [esp + 0x38], 0
mov ebx, pe_nt_image_headers32
lea edx, [esp + 0x2098]
mov ecx, ebx
mov eax, edi
call fcn.00402dcc
mov dword [esp + 0x64], eax
lea edx, [esp + 0x2098]
mov ecx, dword [esp + 0x64]
mov eax, dword [esp]
call fcn.00402c8c
lea edx, [esp + 0x2098]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.00409ab4
mov ebx, eax
and ebx, 0xffff
lea eax, [esp + 0x22a4]
mov edx, edi
call fcn.00402818
push dword [esp + 0x58]
push dword [esp + 0x58]
xor edx, edx
mov eax, edi
call fcn.00402f08
mov eax, edi
call fcn.0040300c
mov esi, eax
mov eax, edi
and esi, 0xff
call fcn.0040300c
xor edx, edx
mov dl, al
lea eax, [esp + 0x22a4]
shl edx, 8
add esi, edx
mov edx, 2
mov dword [esp + 0x68], esi
add dword [esp + 0x54], 2
adc dword [esp + 0x58], 0
call fcn.00402834
cmp ebx, dword [esp + 0x68]
je 0x420b1e
mov ecx, dword [esp + 0x5c]
inc ecx
shl ecx, 9
push ecx
mov eax, dword [esp + 0x60]
shl eax, 9
push eax
push dword [esp + 0x64]
mov eax, 0xdcc
call fcn.0040c264
push eax
call fcn.00422428
add esp, 0x10
push pe_nt_image_headers32
lea edx, [esp + 0x209c]
push edx
lea ecx, [esp + 0x22b8]
push ecx
call fcn.00430150
add esp, 0xc
mov ebp, dword [esp + 0x44]
shl ebp, 9
add ebp, dword [esp + 0x2298]
mov byte [esp + 0x6c], 0
xor eax, eax
mov dl, byte [ebp + eax]
xor byte [esp + eax + 0x2098], dl
inc eax
cmp eax, 0x200
jl 0x4209b9
lea edx, [esp + 0x2098]
mov ecx, pe_nt_image_headers32
or eax, 0xffffffff
call fcn.00409ab4
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [esp + 0x68]
jne 0x4209f8
mov byte [esp + 0x6c], 1
jmp 0x420ab6
push pe_nt_image_headers32
lea eax, [esp + 0x22b4]
push eax
lea edx, [esp + 0x20a0]
push edx
call fcn.00430150
add esp, 0xc
xor esi, esi
mov al, byte [ebp + esi]
lea edx, [esp + 0x2098]
xor byte [esp + esi + 0x2098], al
or eax, 0xffffffff
mov ecx, pe_nt_image_headers32
call fcn.00409ab4
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [esp + 0x68]
jne 0x420a4b
mov byte [esp + 0x6c], 1
jmp 0x420a54
inc esi
cmp esi, 0x200
jl 0x420a17
cmp byte [esp + 0x6c], 0
jne 0x420ab6
push pe_nt_image_headers32
lea eax, [esp + 0x22b4]
push eax
lea edx, [esp + 0x20a0]
push edx
call fcn.00430150
add esp, 0xc
mov esi, 0x1ff
mov al, byte [ebp + esi]
lea edx, [esp + 0x2098]
xor byte [esp + esi + 0x2098], al
or eax, 0xffffffff
mov ecx, pe_nt_image_headers32
call fcn.00409ab4
mov ebx, eax
and ebx, 0xffff
cmp ebx, dword [esp + 0x68]
jne 0x420ab1
mov byte [esp + 0x6c], 1
jmp 0x420ab6
dec esi
test esi, esi
jge 0x420a7d
cmp byte [esp + 0x6c], 0
je 0x420b09
mov eax, dword [esp]
call fcn.00402f84
push edx
push eax
mov eax, dword [esp + 0x6c]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
xor edx, edx
mov eax, dword [esp + 8]
call fcn.00402f08
lea edx, [esp + 0x2098]
mov ecx, dword [esp + 0x64]
mov eax, dword [esp]
call fcn.00402c8c
mov eax, 0xdce
call fcn.0040c264
push eax
call fcn.00422428
pop ecx
jmp 0x420b1e
mov eax, 0xdd0
call fcn.0040c264
push eax
call fcn.00422428
pop ecx
inc dword [esp + 0x60]
inc dword [esp + 0x5c]
inc dword [esp + 0x44]
mov edx, dword [esp + 0x44]
cmp edx, dword [esp + 4]
jb 0x420b36
xor ecx, ecx
mov dword [esp + 0x44], ecx
cmp dword [esp + 0x38], 0
jne 0x420b4a
cmp dword [esp + 0x34], 0
ja 0x420855
jmp 0x420b50
jg 0x420855
push dword [esp + 0x40]
push dword [esp + 0x40]
xor edx, edx
mov eax, edi
call fcn.00402f08
push 0x80000000
push 0
mov edx, dword [esp + 8]
mov eax, edi
call fcn.00403200
push 0
push 0
xor edx, edx
mov eax, edi
call fcn.00402f08
cmp dword [esp + 0x60], 0
je 0x420b8e
mov eax, 1
jmp 0x420b93
mov eax, 2
push eax
lea eax, [esp + 0x229c]
mov edx, 2
call fcn.00401244
lea eax, [esp + 0x74]
mov edx, 2
call fcn.00402834
pop eax
add esp, 0x24b0
pop ebp
pop edi
pop esi
pop ebx
ret