Function at 0x40e54e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x930
mov eax, dword [0x43674c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x20]
push edi
mov dword [ebp - 0x91c], eax
mov eax, dword [ebp + 0x28]
push 0x8ff
mov dword [ebp - 0x928], eax
xor edi, edi
lea eax, [ebp - 0x913]
push edi
push eax
mov dword [ebp - 0x920], ebx
mov byte [ebp - 0x914], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp ebx, edi
je 0x40eb02
cmp dword [ebp + 0x18], edi
je 0x40eb02
cmp esi, edi
je 0x40eb02
mov ebx, dword [ebp + 0x14]
test bl, 7
jne 0x40eb02
mov eax, dword [ebp + 0x1c]
test al, 7
jne 0x40eb02
cmp dword [ebp + 0x24], ebx
jb 0x40eb02
shr eax, 3
mov byte [ebp - 0x915], 3
cmp eax, 3
ja 0x40e5ee
mov byte [ebp - 0x915], al
push 0x900
lea eax, [ebp - 0x914]
push edi
push eax
call sub.MSVCR100.dll_memset
movzx eax, byte [ebp - 0x915]
add esp, 0xc
cmp eax, edi
jle 0x40e646
mov ecx, dword [ebp + 0x18]
lea edi, [ebp - 0x914]
mov dword [ebp - 0x924], ecx
mov dword [ebp - 0x92c], eax
push dword [ebp - 0x924]
mov ecx, edi
call fcn.0040e34e
add dword [ebp - 0x924], 8
add edi, 0x300
dec dword [ebp - 0x92c]
pop ecx
jne 0x40e623
cmp dword [ebp + 0xc], 0
jne 0x40e7b9
cmp byte [ebp - 0x915], 1
jne 0x40e690
shr ebx, 3
test ebx, ebx
jle 0x40eafd
mov edi, dword [ebp - 0x920]
sub esi, edi
push dword [ebp - 0x91c]
lea eax, [esi + edi]
push edi
push eax
lea ecx, [ebp - 0x914]
call fcn.0040e3f0
add esp, 0xc
add edi, 8
dec ebx
jne 0x40e66c
jmp 0x40eafd
cmp byte [ebp - 0x915], 2
jne 0x40e707
shr ebx, 3
test ebx, ebx
jle 0x40eafd
mov edi, dword [ebp - 0x920]
xor eax, eax
cmp dword [ebp - 0x91c], eax
sete al
sub edi, esi
mov dword [ebp - 0x924], eax
push dword [ebp - 0x91c]
lea eax, [edi + esi]
push eax
push esi
lea ecx, [ebp - 0x914]
call fcn.0040e3f0
push dword [ebp - 0x924]
lea ecx, [ebp - 0x614]
push esi
push esi
call fcn.0040e3f0
push dword [ebp - 0x91c]
lea ecx, [ebp - 0x914]
push esi
push esi
call fcn.0040e3f0
add esp, 0x24
add esi, 8
dec ebx
jne 0x40e6bd
jmp 0x40eafd
cmp byte [ebp - 0x915], 3
jne 0x40eb02
shr ebx, 3
mov eax, ebx
test eax, eax
jle 0x40eafd
mov edi, dword [ebp - 0x91c]
mov ecx, edi
neg ecx
sbb ecx, ecx
and ecx, 2
imul ecx, ecx, 0x300
lea ebx, [ebp + ecx - 0x914]
xor ecx, ecx
test edi, edi
sete cl
mov dword [ebp - 0x91c], eax
mov dword [ebp - 0x924], ecx
mov ecx, edi
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
add ecx, 2
imul ecx, ecx, 0x300
lea ecx, [ebp + ecx - 0x914]
mov dword [ebp - 0x92c], ecx
push edi
push dword [ebp - 0x920]
mov ecx, ebx
push esi
call fcn.0040e3f0
push dword [ebp - 0x924]
lea ecx, [ebp - 0x614]
push esi
push esi
call fcn.0040e3f0
mov ecx, dword [ebp - 0x92c]
push edi
push esi
push esi
call fcn.0040e3f0
add dword [ebp - 0x920], 8
add esp, 0x24
add esi, 8
dec dword [ebp - 0x91c]
jne 0x40e76f
jmp 0x40eafd
xor eax, eax
cmp dword [ebp + 0xc], 1
jne 0x40eb04
cmp dword [ebp - 0x928], eax
je 0x40eb04
mov byte [ebp - 0xc], al
lea edi, [ebp - 0xb]
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp - 0x14], 0
lea edi, [ebp - 0x13]
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 8
push dword [ebp - 0x928]
stosb byte es:[edi], al
lea eax, [ebp - 0xc]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
cmp byte [ebp - 0x915], 1
jne 0x40e8c3
shr ebx, 3
mov eax, ebx
test eax, eax
jle 0x40eafd
mov ebx, dword [ebp - 0x920]
lea ecx, [ebp - 0xc]
mov edi, ecx
sub ebx, ecx
sub edi, esi
mov dword [ebp - 0x928], eax
xor ecx, ecx
cmp dword [ebp - 0x91c], ecx
jne 0x40e84a
lea eax, [ebp + ecx - 0xc]
mov dl, byte [ebx + eax]
xor dl, byte [eax]
inc ecx
mov byte [ebp + ecx - 0x15], dl
cmp ecx, 8
jl 0x40e835
jmp 0x40e85e
push 8
push dword [ebp - 0x920]
lea eax, [ebp - 0x14]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push dword [ebp - 0x91c]
lea eax, [ebp - 0x14]
push eax
push esi
lea ecx, [ebp - 0x914]
call fcn.0040e3f0
add esp, 0xc
cmp dword [ebp - 0x91c], 0
push 8
jne 0x40e885
push esi
jmp 0x40e897
mov eax, esi
pop ecx
mov dl, byte [edi + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x40e888
push 8
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push 8
pop eax
add dword [ebp - 0x920], eax
add esi, eax
sub edi, eax
add ebx, eax
dec dword [ebp - 0x928]
jne 0x40e82b
jmp 0x40eafd
cmp byte [ebp - 0x915], 2
jne 0x40e9c1
shr ebx, 3
mov eax, ebx
test eax, eax
jle 0x40eafd
mov ebx, dword [ebp - 0x920]
xor ecx, ecx
cmp dword [ebp - 0x91c], ecx
mov dword [ebp - 0x928], eax
sete cl
mov dword [ebp - 0x924], ecx
lea ecx, [ebp - 0xc]
mov edi, ecx
sub ebx, ecx
sub edi, esi
xor ecx, ecx
cmp dword [ebp - 0x91c], ecx
jne 0x40e922
lea eax, [ebp + ecx - 0xc]
mov dl, byte [ebx + eax]
xor dl, byte [eax]
inc ecx
mov byte [ebp + ecx - 0x15], dl
cmp ecx, 8
jl 0x40e90d
jmp 0x40e936
push 8
push dword [ebp - 0x920]
lea eax, [ebp - 0x14]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push dword [ebp - 0x91c]
lea eax, [ebp - 0x14]
push eax
push esi
lea ecx, [ebp - 0x914]
call fcn.0040e3f0
push dword [ebp - 0x924]
lea ecx, [ebp - 0x614]
push esi
push esi
call fcn.0040e3f0
push dword [ebp - 0x91c]
lea ecx, [ebp - 0x914]
push esi
push esi
call fcn.0040e3f0
add esp, 0x24
cmp dword [ebp - 0x91c], 0
push 8
jne 0x40e983
push esi
jmp 0x40e995
mov eax, esi
pop ecx
mov dl, byte [edi + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x40e986
push 8
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push 8
pop eax
add dword [ebp - 0x920], eax
add esi, eax
sub edi, eax
add ebx, eax
dec dword [ebp - 0x928]
jne 0x40e903
jmp 0x40eafd
cmp byte [ebp - 0x915], 3
jne 0x40eb02
shr ebx, 3
mov eax, ebx
test eax, eax
jle 0x40eafd
mov ecx, dword [ebp - 0x91c]
neg ecx
sbb ecx, ecx
and ecx, 2
imul ecx, ecx, 0x300
lea ecx, [ebp + ecx - 0x914]
mov dword [ebp - 0x930], ecx
xor ecx, ecx
cmp dword [ebp - 0x91c], ecx
mov ebx, dword [ebp - 0x920]
sete cl
mov dword [ebp - 0x928], eax
mov dword [ebp - 0x924], ecx
mov ecx, dword [ebp - 0x91c]
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
add ecx, 2
imul ecx, ecx, 0x300
lea ecx, [ebp + ecx - 0x914]
mov dword [ebp - 0x92c], ecx
lea ecx, [ebp - 0xc]
mov edi, ecx
sub ebx, ecx
sub edi, esi
xor ecx, ecx
cmp dword [ebp - 0x91c], ecx
jne 0x40ea63
lea eax, [ebp + ecx - 0xc]
mov dl, byte [eax + ebx]
xor dl, byte [eax]
inc ecx
mov byte [ebp + ecx - 0x15], dl
cmp ecx, 8
jl 0x40ea4e
jmp 0x40ea77
push 8
push dword [ebp - 0x920]
lea eax, [ebp - 0x14]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push dword [ebp - 0x91c]
mov ecx, dword [ebp - 0x930]
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.0040e3f0
push dword [ebp - 0x924]
lea ecx, [ebp - 0x614]
push esi
push esi
call fcn.0040e3f0
push dword [ebp - 0x91c]
mov ecx, dword [ebp - 0x92c]
push esi
push esi
call fcn.0040e3f0
add esp, 0x24
cmp dword [ebp - 0x91c], 0
push 8
jne 0x40eac4
push esi
jmp 0x40ead6
mov eax, esi
pop ecx
mov dl, byte [edi + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x40eac7
push 8
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push 8
pop eax
add dword [ebp - 0x920], eax
add esi, eax
sub edi, eax
add ebx, eax
dec dword [ebp - 0x928]
jne 0x40ea44
xor eax, eax
inc eax
jmp 0x40eb04
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00421350
leave
ret