Function at 0x1006160
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x420
mov eax, dword [0x102d280]
xor eax, esp
test ecx, ecx
push ebx
mov ebx, dword [esp + 0x438]
push ebp
mov ebp, dword [esp + 0x430]
push esi
mov esi, dword [esp + 0x438]
mov dword [esp + 0x428], eax
mov eax, dword [esp + 0x43c]
push edi
mov edi, dword [esp + 0x434]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
je 0x10068da
test edi, edi
je 0x10068da
test ebp, ebp
je 0x10068da
test ebx, ebx
je 0x1006295
test esi, esi
je 0x1006215
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10061e0
sub eax, edx
lea edi, [eax + 1]
push edi
call fcn.0100d7bd
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x1006211
mov ecx, edi
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x1006255
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1006220
sub eax, edx
lea esi, [eax + 1]
push esi
call fcn.0100d7bd
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
je 0x1006255
mov ecx, esi
mov esi, dword [esp + 0x20]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1006295
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1006260
sub eax, edx
lea esi, [eax + 1]
push esi
call fcn.0100d7bd
add esp, 4
test eax, eax
mov dword [esp + 0x1c], eax
je 0x1006295
mov ecx, esi
mov esi, dword [esp + 0x28]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, ebp
and eax, 3
mov dword [esp + 0x20], eax
je 0x10062e0
neg ebx
sbb ebx, ebx
and ebx, 0xe
push ebx
mov ebx, dword [esp + 0x18]
push edi
push ebx
push ecx
push 0
push 0
push 0
mov edx, 4
sub edx, eax
mov eax, dword [esp + 0x34]
push edx
push 0x1003f60
push ebp
push eax
mov eax, esi
call fcn.01004220
add esp, 0x2c
jmp 0x1006301
mov edx, dword [esp + 0x18]
push ecx
mov eax, ebx
mov ebx, dword [esp + 0x18]
neg eax
push ebp
sbb eax, eax
push esi
push edx
and eax, 0xe
mov ecx, edi
mov edx, ebx
call fcn.01004410
add esp, 0x10
push esi
mov eax, ebp
lea ecx, [esp + 0x30]
call fcn.010016e0
push ebp
call fcn.0100d7bd
mov esi, eax
add esp, 8
test esi, esi
je 0x100635f
xor eax, eax
test ebp, ebp
jle 0x1006335
lea ecx, [esp + ebp + 0x2b]
mov dl, byte [ecx]
mov byte [eax + esi], dl
add eax, 1
sub ecx, 1
cmp eax, ebp
jl 0x1006326
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push eax
push ebp
push esi
push ecx
mov eax, 0x10001
mov ecx, edi
mov edx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x100635f
push esi
call fcn.0100d77e
add esp, 4
lea esi, [ebp + 3]
and esi, 0xfffffffc
push esi
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x10063ec
mov eax, dword [esp + 0x20]
test eax, eax
je 0x1006381
add eax, 0xffffffff
jmp 0x1006386
mov eax, 3
xor ecx, ecx
test ebp, ebp
mov byte [edi + 3], 0xc1
mov byte [edi + 2], 0xc1
mov byte [edi + 1], 0xc1
mov byte [edi], 0xc1
jle 0x10063ba
jmp 0x10063a0
test al, 3
mov dl, byte [esp + ecx + 0x2c]
mov byte [eax + edi], dl
je 0x10063b0
sub eax, 1
jmp 0x10063b3
add eax, 7
add ecx, 1
cmp ecx, ebp
jl 0x10063a0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push eax
push esi
push edi
push ecx
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x10063f0
push edi
call fcn.0100d77e
add esp, 4
jmp 0x10063f0
mov ebx, dword [esp + 0x1c]
cmp dword [esp + 0x20], 0
je 0x100651c
push esi
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x1006476
xor ecx, ecx
test ebp, ebp
mov eax, 3
mov byte [esi + edi - 4], 0xc1
mov byte [esi + edi - 3], 0xc1
mov byte [esi + edi - 2], 0xc1
mov byte [esi + edi - 1], 0xc1
jle 0x100644a
lea esp, [esp]
test al, 3
mov dl, byte [esp + ecx + 0x2c]
mov byte [eax + edi], dl
je 0x1006440
sub eax, 1
jmp 0x1006443
add eax, 7
add ecx, 1
cmp ecx, ebp
jl 0x1006430
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
push esi
push edi
push ecx
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x1006476
push edi
call fcn.0100d77e
add esp, 4
push esi
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x100651c
mov edx, ebp
xor eax, eax
and edx, 0xfffffffc
mov ecx, 3
mov byte [esi + edi - 4], 0xc1
mov byte [esi + edi - 3], 0xc1
mov byte [esi + edi - 2], 0xc1
mov byte [esi + edi - 1], 0xc1
jle 0x10064cf
jmp 0x10064b0
test cl, 3
mov bl, byte [esp + eax + 0x2c]
mov byte [ecx + edi], bl
je 0x10064c1
sub ecx, 1
jmp 0x10064c4
add ecx, 7
add eax, 1
cmp eax, edx
jl 0x10064b0
mov ebx, dword [esp + 0x1c]
cmp eax, ebp
mov edx, dword [esp + 0x20]
lea ecx, [ecx + edx - 4]
jge 0x10064f0
add ecx, edi
lea ecx, [ecx]
mov dl, byte [esp + eax + 0x2c]
mov byte [ecx], dl
add eax, 1
sub ecx, 1
cmp eax, ebp
jl 0x10064e0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
push esi
push edi
push ecx
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x100651c
push edi
call fcn.0100d77e
add esp, 4
push esi
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x1006594
lea ecx, [ebp - 1]
test ecx, ecx
mov eax, 3
mov byte [esi + edi - 4], 0xc1
mov byte [esi + edi - 3], 0xc1
mov byte [esi + edi - 2], 0xc1
mov byte [esi + edi - 1], 0xc1
jl 0x1006568
jmp 0x1006550
test al, 3
mov dl, byte [esp + ecx + 0x2c]
mov byte [eax + edi], dl
je 0x1006560
sub eax, 1
jmp 0x1006563
add eax, 7
sub ecx, 1
jns 0x1006550
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
push esi
push edi
push ecx
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x1006594
push edi
call fcn.0100d77e
add esp, 4
lea eax, [ebp + ebp]
push eax
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x1006656
xor esi, esi
xor ecx, ecx
test ebp, ebp
jle 0x10065e8
movzx eax, byte [esp + ecx + 0x2c]
mov edx, eax
xor edx, 0xffffffcf
sar edx, 4
and edx, 0xf
mov dl, byte [edx + 0x102bb10]
xor eax, 1
mov byte [esi + edi], dl
and eax, 0xf
mov al, byte [eax + 0x102bb10]
add esi, 1
mov byte [esi + edi], al
add ecx, 1
add esi, 1
cmp ecx, ebp
jl 0x10065b3
cmp byte [edi], 0xf1
jne 0x100662a
sub esi, 1
push esi
lea ecx, [edi + 1]
push ecx
push edi
call fcn.0100d370
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push 0x10001
push ebx
push edx
push eax
push 0
push 0
push 0x30
push 1
push 0x1003f60
push esi
push ecx
mov eax, edi
call fcn.01004220
add esp, 0x38
jmp 0x1006649
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
push esi
push edi
push eax
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x1006656
push edi
call fcn.0100d77e
add esp, 4
lea eax, [ebp + ebp]
push eax
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x1006718
xor esi, esi
xor ecx, ecx
test ebp, ebp
jle 0x10066aa
movzx eax, byte [esp + ecx + 0x2c]
mov edx, eax
xor edx, 0xffffffcf
sar edx, 4
and edx, 0xf
mov dl, byte [edx + 0x102bb20]
xor eax, 1
mov byte [esi + edi], dl
and eax, 0xf
mov al, byte [eax + 0x102bb20]
add esi, 1
mov byte [esi + edi], al
add ecx, 1
add esi, 1
cmp ecx, ebp
jl 0x1006675
cmp byte [edi], 0xf1
jne 0x10066ec
sub esi, 1
push esi
lea ecx, [edi + 1]
push ecx
push edi
call fcn.0100d370
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push 0x10001
push ebx
push edx
push eax
push 0
push 0
push 0x30
push 1
push 0x1003f60
push esi
push ecx
mov eax, edi
call fcn.01004220
add esp, 0x38
jmp 0x100670b
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
push esi
push edi
push eax
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x1006718
push edi
call fcn.0100d77e
add esp, 4
mov ecx, ebp
sar ecx, 2
lea eax, [ecx + ebp*2]
push eax
mov dword [esp + 0x28], eax
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x10067fb
xor esi, esi
xor edx, edx
test ebp, ebp
mov ecx, ebp
jle 0x100678d
movzx eax, byte [esp + edx + 0x2c]
mov ebx, eax
xor ebx, 0xffffffcf
sar ebx, 4
and ebx, 0xf
mov bl, byte [ebx + 0x102bb10]
xor eax, 1
mov byte [esi + edi], bl
and eax, 0xf
mov al, byte [eax + 0x102bb10]
add esi, 1
mov byte [esi + edi], al
sub ecx, 1
add esi, 1
test cl, 3
jne 0x1006782
test ecx, ecx
je 0x1006782
mov byte [esi + edi], 0xe1
add esi, 1
add edx, 1
cmp edx, ebp
jl 0x1006741
mov ebx, dword [esp + 0x1c]
cmp byte [edi], 0xf1
jne 0x10067cf
sub esi, 1
push esi
lea ecx, [edi + 1]
push ecx
push edi
call fcn.0100d370
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push 0x10001
push ebx
push edx
push eax
push 0
push 0
push 0x30
push 1
push 0x1003f60
push esi
push ecx
mov eax, edi
call fcn.01004220
add esp, 0x38
jmp 0x10067ee
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
push esi
push edi
push eax
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x10067fb
push edi
call fcn.0100d77e
add esp, 4
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0100d7bd
mov edi, eax
add esp, 4
test edi, edi
je 0x10068da
xor esi, esi
xor edx, edx
test ebp, ebp
mov ecx, ebp
jle 0x100686c
lea esp, [esp]
movzx eax, byte [esp + edx + 0x2c]
mov ebx, eax
xor ebx, 0xffffffcf
sar ebx, 4
and ebx, 0xf
mov bl, byte [ebx + 0x102bb20]
xor eax, 1
mov byte [esi + edi], bl
and eax, 0xf
mov al, byte [eax + 0x102bb20]
add esi, 1
mov byte [esi + edi], al
sub ecx, 1
add esi, 1
test cl, 3
jne 0x1006861
test ecx, ecx
je 0x1006861
mov byte [esi + edi], 0xe1
add esi, 1
add edx, 1
cmp edx, ebp
jl 0x1006820
mov ebx, dword [esp + 0x1c]
cmp byte [edi], 0xf1
jne 0x10068ae
sub esi, 1
push esi
lea ecx, [edi + 1]
push ecx
push edi
call fcn.0100d370
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push 0x10001
push ebx
push edx
push eax
push 0
push 0
push 0x30
push 1
push 0x1003f60
push esi
push ecx
mov eax, edi
call fcn.01004220
add esp, 0x38
jmp 0x10068cd
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
push esi
push edi
push eax
mov eax, 0x10001
mov ecx, ebx
call fcn.01004410
add esp, 0x10
test eax, eax
jne 0x10068da
push edi
call fcn.0100d77e
add esp, 4
mov ecx, dword [esp + 0x42c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0100ffd5
add esp, 0x420
ret