Function at 0x40e340
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x584
push ebx
push ebp
mov ebp, dword [esp + 0x590]
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x48]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x598]
mov ecx, ebp
mov edx, edi
jmp 0x40e370
mov eax, dword [ecx]
mov ebx, dword [esp + eax*4 + 0x48]
lea eax, [esp + eax*4 + 0x48]
inc ebx
add ecx, 4
dec edx
mov dword [eax], ebx
jne 0x40e370
cmp dword [esp + 0x48], edi
jne 0x40e3af
mov eax, dword [esp + 0x5a8]
mov ecx, dword [esp + 0x5ac]
pop edi
mov dword [eax], 0
pop ebp
mov dword [ecx], 0
xor eax, eax
pop ebx
add esp, 0x584
ret
mov ebx, dword [esp + 0x5ac]
mov edx, dword [ebx]
push esi
mov dword [esp + 0x14], edx
mov ecx, 1
xor esi, esi
cmp dword [esp + ecx*4 + 0x4c], esi
jne 0x40e3f1
cmp dword [esp + ecx*4 + 0x50], esi
jne 0x40e3e6
cmp dword [esp + ecx*4 + 0x54], esi
jne 0x40e3e9
cmp dword [esp + ecx*4 + 0x58], esi
jne 0x40e3ee
add ecx, 4
cmp ecx, 0x10
jbe 0x40e3c4
jmp 0x40e3f1
inc ecx
jmp 0x40e3f1
add ecx, 2
jmp 0x40e3f1
add ecx, 3
cmp edx, ecx
mov dword [esp + 0x10], ecx
jae 0x40e3ff
mov edx, ecx
mov dword [esp + 0x14], edx
mov eax, 0x10
cmp dword [esp + eax*4 + 0x4c], esi
jne 0x40e40d
dec eax
jne 0x40e404
cmp edx, eax
mov dword [esp + 0x2c], eax
jbe 0x40e41b
mov edx, eax
mov dword [esp + 0x14], edx
mov dword [ebx], edx
mov ebx, 1
shl ebx, cl
cmp ecx, eax
jae 0x40e441
jmp 0x40e430
sub ebx, dword [esp + ecx*4 + 0x4c]
js 0x40e670
inc ecx
shl ebx, 1
cmp ecx, eax
jb 0x40e430
mov ecx, dword [esp + eax*4 + 0x4c]
sub ebx, ecx
mov dword [esp + 0x48], ebx
js 0x40e670
add ecx, ebx
mov dword [esp + eax*4 + 0x4c], ecx
xor ecx, ecx
dec eax
mov dword [esp + 0x94], esi
je 0x40e476
xor edx, edx
add ecx, dword [esp + edx + 0x50]
add edx, 4
dec eax
mov dword [esp + edx + 0x94], ecx
jne 0x40e465
xor edx, edx
mov eax, dword [ebp]
add ebp, 4
cmp eax, esi
je 0x40e49a
mov ecx, dword [esp + eax*4 + 0x90]
lea eax, [esp + eax*4 + 0x90]
mov dword [esp + ecx*4 + 0x114], edx
inc ecx
mov dword [eax], ecx
inc edx
cmp edx, edi
jb 0x40e478
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
neg eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
or ebp, 0xffffffff
lea edx, [esp + 0x114]
xor edi, edi
cmp eax, ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x90], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebp
mov dword [esp + 0xd4], esi
jg 0x40e79f
lea ecx, [eax - 1]
lea edx, [esp + eax*4 + 0x4c]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x28], edx
mov edi, edi
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
test eax, eax
mov dword [esp + 0x30], eax
je 0x40e770
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
dec edx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x18]
lea eax, [edx + ecx]
cmp dword [esp + 0x10], eax
jle 0x40e645
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x34]
add edx, eax
add ecx, eax
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x2c]
inc ebp
add ebx, eax
sub edx, ecx
cmp edx, eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x34], ebx
jbe 0x40e563
mov edx, eax
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x30]
sub ebx, ecx
mov ecx, ebx
mov eax, 1
shl eax, cl
lea ecx, [esi + 1]
cmp eax, ecx
jbe 0x40e5a3
or ecx, 0xffffffff
sub ecx, esi
mov esi, dword [esp + 0x28]
add eax, ecx
inc ebx
cmp ebx, edx
jae 0x40e5a3
lea ecx, [ecx]
mov ecx, dword [esi + 4]
add esi, 4
shl eax, 1
cmp eax, ecx
jbe 0x40e5a3
sub eax, ecx
inc ebx
cmp ebx, edx
jb 0x40e590
mov ecx, ebx
mov esi, 1
shl esi, cl
lea edx, [esi*8 + 8]
push edx
call fcn.0041c2d9
add esp, 4
test eax, eax
je 0x40e7bd
mov ecx, dword [0x4a7f5c]
lea edx, [ecx + esi + 1]
mov dword [0x4a7f5c], edx
mov edx, dword [esp + 0x5ac]
lea ecx, [eax + 8]
add eax, 4
test ebp, ebp
mov edi, ecx
mov dword [edx], ecx
mov dword [esp + 0x5ac], eax
mov dword [eax], 0
mov dword [esp + ebp*4 + 0xd4], edi
je 0x40e637
mov ecx, dword [esp + 0x1c]
mov al, byte [esp + 0x14]
mov edx, ecx
mov dword [esp + ebp*4 + 0x90], ecx
mov ecx, dword [esp + 0x38]
add bl, 0x10
shr edx, cl
mov ecx, dword [esp + ebp*4 + 0xd0]
mov byte [esp + 0x21], al
mov byte [esp + 0x20], bl
mov ebx, dword [esp + 0x20]
mov eax, edi
mov dword [ecx + edx*8], ebx
mov dword [esp + 0x24], eax
mov dword [ecx + edx*8 + 4], eax
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x10], edx
jg 0x40e530
mov al, byte [esp + 0x10]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x59c]
mov edx, dword [esp + 0x3c]
sub al, bl
mov byte [esp + 0x21], al
lea eax, [esp + ecx*4 + 0x114]
cmp edx, eax
jb 0x40e680
mov byte [esp + 0x20], 0x63
jmp 0x40e6c7
pop esi
pop edi
pop ebp
mov eax, 2
pop ebx
add esp, 0x584
ret
mov eax, dword [edx]
mov ecx, dword [esp + 0x5a0]
cmp eax, ecx
jae 0x40e69e
cmp eax, 0x100
setb cl
add cl, 0xf
mov byte [esp + 0x20], cl
jmp 0x40e6bb
sub eax, ecx
mov ecx, dword [esp + 0x5a8]
shl eax, 1
mov cl, byte [eax + ecx]
mov byte [esp + 0x20], cl
mov ecx, dword [esp + 0x5a4]
mov ax, word [eax + ecx]
add edx, 4
mov word [esp + 0x24], ax
mov dword [esp + 0x3c], edx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
sub ecx, ebx
mov edx, 1
shl edx, cl
mov ecx, ebx
shr eax, cl
cmp eax, esi
jae 0x40e703
lea ecx, [edi + eax*8]
mov ebp, dword [esp + 0x20]
mov dword [ecx], ebp
mov ebp, dword [esp + 0x24]
mov dword [ecx + 4], ebp
lea ebp, [edx*8]
add eax, edx
add ecx, ebp
cmp eax, esi
jb 0x40e6e3
mov ebp, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x1c]
mov eax, 1
shl eax, cl
test edx, eax
je 0x40e71e
xor edx, eax
shr eax, 1
test edx, eax
jne 0x40e716
xor edx, eax
mov ecx, ebx
mov eax, 1
shl eax, cl
mov ecx, dword [esp + ebp*4 + 0x90]
mov dword [esp + 0x1c], edx
dec eax
and eax, edx
cmp eax, ecx
je 0x40e764
jmp 0x40e740
sub ebx, dword [esp + 0x14]
mov ecx, ebx
mov eax, 1
shl eax, cl
mov ecx, dword [esp + ebp*4 + 0x8c]
dec ebp
dec eax
and eax, edx
cmp eax, ecx
jne 0x40e740
mov dword [esp + 0x18], ebx
mov dword [esp + 0x40], ebp
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40e502
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
inc eax
add ebx, 4
inc edx
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x44], edx
jle 0x40e4f0
mov ebx, dword [esp + 0x48]
xor esi, esi
cmp ebx, esi
je 0x40e7b0
mov ecx, dword [esp + 0x2c]
mov eax, 1
cmp ecx, eax
jne 0x40e7b2
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x584
ret
test ebp, ebp
je 0x40e7e5
mov eax, dword [esp + 0xd4]
test eax, eax
je 0x40e7e5
lea esp, [esp]
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.0041c2eb
add esp, 4
test esi, esi
mov eax, esi
jne 0x40e7d0
pop esi
pop edi
pop ebp
mov eax, 3
pop ebx
add esp, 0x584
ret