Function at 0x40e440
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], edx
xor esi, esi
mov dword [ebp - 0xc], edi
cmp dword [edi], esi
je 0x40e48d
mov eax, dword [ebp + 8]
mov ebx, eax
test eax, eax
jle 0x40e482
mov edi, edx
movzx eax, byte [edi]
lea ecx, [esi*8]
dec ebx
lea edi, [edi + 1]
movzx edx, byte [eax + 0x479a68]
xor edx, ecx
xor esi, edx
test ebx, ebx
jg 0x40e462
mov edi, dword [ebp - 0xc]
mov eax, esi
xor edx, edx
div dword [edi]
mov esi, edx
mov edx, dword [ebp - 4]
mov ebx, dword [ebp + 8]
mov ecx, edi
push esi
push ebx
call fcn.0040e310
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40e50f
mov eax, dword [ebp + 0xc]
mov ebx, dword [ecx + 8]
test eax, eax
jne 0x40e4fd
mov edx, dword [ecx + 4]
mov eax, dword [ecx]
test edx, edx
je 0x40e4b9
mov dword [edx], eax
jmp 0x40e4bc
mov dword [edi + 8], eax
mov edx, dword [ecx]
test edx, edx
je 0x40e4c8
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov edx, dword [edi + 0xc]
test edx, edx
je 0x40e4de
cmp dword [edx + esi*8 + 4], ecx
jne 0x40e4db
mov eax, dword [ecx]
mov dword [edx + esi*8 + 4], eax
dec dword [edx + esi*8]
push ecx
call fcn.0040ad30
add esp, 4
add dword [edi + 4], 0xffffffff
jne 0x40e506
mov ecx, edi
call fcn.0040e2c0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
je 0x40e745
push 0x14
call fcn.0040aa40
mov ecx, eax
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x40e747
mov edx, dword [ebp - 4]
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], ebx
mov dword [ecx + 8], eax
inc dword [edi + 4]
mov edx, dword [edi + 4]
cmp edx, 0xa
jb 0x40e6db
mov eax, dword [edi]
add eax, eax
cmp edx, eax
jbe 0x40e6db
add edx, edx
mov dword [ebp - 8], 0x80
lea eax, [edx*8]
cmp eax, 0x400
cmova edx, dword [ebp - 8]
mov dword [ebp - 8], edx
cmp edx, dword [edi]
je 0x40e6db
mov eax, dword [0x4842fc]
test eax, eax
je 0x40e58c
call eax
mov edx, dword [ebp - 8]
lea eax, [edx*8]
push eax
call fcn.0040aa40
mov ecx, dword [0x484300]
add esp, 4
mov dword [ebp - 8], eax
test ecx, ecx
je 0x40e5ae
call ecx
mov eax, dword [ebp - 8]
test eax, eax
je 0x40e6d8
push dword [edi + 0xc]
call fcn.0040ad30
mov esi, dword [ebp - 8]
add esp, 4
mov dword [edi + 0xc], esi
push esi
call dword [0x483198]
shr eax, 3
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [edi], eax
lea ecx, [eax*8]
push ecx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov esi, dword [edi + 8]
add esp, 0xc
mov dword [edi + 8], 0
test esi, esi
je 0x40e6a5
nop
mov edx, dword [esi + 0x10]
xor ebx, ebx
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x14], eax
test edx, edx
jle 0x40e631
mov edi, eax
movzx eax, byte [edi]
lea edi, [edi + 1]
dec edx
movzx ecx, byte [eax + 0x479a68]
lea eax, [ebx*8]
xor ecx, eax
xor ebx, ecx
test edx, edx
jg 0x40e611
mov edi, dword [ebp - 0xc]
mov eax, dword [esi]
xor edx, edx
mov dword [ebp - 0x14], eax
mov eax, ebx
div dword [ebp - 0x18]
mov eax, dword [ebp - 8]
lea edx, [eax + edx*8]
test edx, edx
je 0x40e67c
mov eax, dword [edx]
test eax, eax
je 0x40e652
mov ecx, dword [edx + 4]
jmp 0x40e654
xor ecx, ecx
inc eax
mov dword [edx + 4], esi
mov dword [edx], eax
test ecx, ecx
je 0x40e67c
mov dword [esi], ecx
mov eax, dword [ecx + 4]
mov dword [esi + 4], eax
mov eax, dword [ecx + 4]
test eax, eax
je 0x40e674
mov dword [eax], esi
mov dword [ecx + 4], esi
jmp 0x40e695
mov dword [edi + 8], esi
mov dword [ecx + 4], esi
jmp 0x40e695
mov eax, dword [edi + 8]
mov dword [esi], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x40e68b
mov dword [eax + 4], esi
mov dword [esi + 4], 0
mov dword [edi + 8], esi
mov eax, dword [ebp - 0x14]
mov esi, eax
test eax, eax
jne 0x40e600
mov ebx, dword [ebp + 8]
xor esi, esi
test ebx, ebx
jle 0x40e6d0
mov edi, dword [ebp - 4]
nop
movzx eax, byte [edi]
lea ecx, [esi*8]
dec ebx
lea edi, [edi + 1]
movzx edx, byte [eax + 0x479a68]
xor edx, ecx
xor esi, edx
test ebx, ebx
jg 0x40e6b0
mov edi, dword [ebp - 0xc]
mov eax, esi
xor edx, edx
div dword [edi]
mov esi, edx
mov ecx, dword [ebp - 0x10]
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40e72c
lea esi, [eax + esi*8]
test esi, esi
je 0x40e72c
mov eax, dword [esi]
test eax, eax
je 0x40e6f4
mov edx, dword [esi + 4]
jmp 0x40e6f6
xor edx, edx
inc eax
mov dword [esi + 4], ecx
mov dword [esi], eax
test edx, edx
je 0x40e72c
mov dword [ecx], edx
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 4]
test eax, eax
je 0x40e71d
mov dword [eax], ecx
xor eax, eax
mov dword [edx + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 8], ecx
xor eax, eax
mov dword [edx + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 8]
mov dword [ecx], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x40e73b
mov dword [eax + 4], ecx
mov dword [ecx + 4], 0
mov dword [edi + 8], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret