Function at 0x40df90
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [0x42bc1c]
sub esp, 0x34
push ebx
push ebp
mov ebp, dword [ecx*4 + 0x42b990]
test ebp, ebp
je 0x40e3f5
mov edx, dword [ecx*4 + 0x42b8d0]
xor eax, eax
test edx, edx
jbe 0x40dfd4
mov bl, byte [eax + ebp]
mov cl, al
add cl, 0x42
xor bl, cl
mov byte [eax + ebp], bl
mov edx, dword [0x42bc1c]
inc eax
cmp eax, dword [edx*4 + 0x42b8d0]
jb 0x40dfb7
xor eax, eax
mov ax, word [ebp]
add ebp, 2
test eax, eax
jbe 0x40e3f5
push esi
push edi
mov dword [esp + 0x3c], eax
mov eax, dword [ebp]
mov esi, dword [ebp + 4]
add ebp, 4
mov dword [esp + 0x14], eax
add ebp, 8
xor eax, eax
mov dword [esp + 0x2c], esi
mov cl, byte [ebp]
inc ebp
mov byte [esp + 0x13], cl
mov edi, ebp
or ecx, 0xffffffff
mov edx, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
mov edx, dword [0x42b774]
lea ebp, [ecx + ebp + 1]
or ecx, 0xffffffff
mov edi, ebp
mov ebx, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
lea ebp, [ecx + ebp + 1]
mov dword [esp + 0x3c], ebp
add ebp, esi
call fcn.0040d7e0
push 0xffdc
push ebx
push 0
call fcn.0040d6a0
mov edi, eax
add esp, 0x14
test edi, edi
mov dword [esp + 0x30], edi
je 0x40e3e4
lea eax, [edi + edi + 1]
push eax
call fcn.0041b140
lea ecx, [edi + 1]
mov dword [esp + 0x3c], eax
push ecx
push ebx
push eax
call fcn.0040d6a0
mov edx, dword [0x42b774]
push 2
push edx
call fcn.004010e0
mov ebx, eax
add esp, 0x18
cmp ebx, 0xffffffff
jne 0x40e0af
test byte [esp + 0x13], 0x28
je 0x40e3d7
mov eax, dword [0x42b774]
push eax
call fcn.00401130
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x40e3d7
test byte [esp + 0x13], 8
je 0x40e13d
push ebx
call fcn.00401260
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x17]
add esp, 4
test al, 0x10
je 0x40e262
mov eax, dword [esp + 0x14]
mov esi, 2
cmp eax, esi
jb 0x40e262
mov ecx, eax
add ecx, 0xfffffffe
push ecx
push ebx
call fcn.00401200
lea edx, [esp + 0x30]
push esi
push edx
push ebx
call fcn.00401160
mov eax, dword [esp + 0x3c]
add esp, 0x14
cmp ax, 0xa0d
je 0x40e262
cmp ax, 0xd0a
je 0x40e262
lea eax, [esp + 0x28]
push esi
push eax
push ebx
mov dword [esp + 0x34], 0xa0d
call fcn.004011a0
mov eax, dword [esp + 0x20]
add esp, 0xc
add eax, esi
mov dword [esp + 0x14], eax
jmp 0x40e262
cmp dword [esp + 0x14], 0xffffffff
jne 0x40e26d
test esi, esi
je 0x40e3ce
push ebx
call fcn.00401260
add esp, 4
cmp eax, 0x8000
mov edi, eax
jb 0x40e167
mov edi, 0x8000
lea ecx, [esp + 0x18]
sub eax, edi
push ecx
push edi
mov dword [esp + 0x28], eax
call fcn.00402120
add esp, 8
test eax, eax
je 0x40e3ce
mov edx, dword [esp + 0x18]
push edi
push edx
push ebx
call fcn.00401160
add esp, 0xc
mov dword [esp + 0x24], 0
mov eax, edi
mov edx, dword [esp + 0x20]
mov ecx, 0x4000
test edx, edx
mov dword [esp + 0x1c], ecx
jne 0x40e1b6
sub eax, esi
inc eax
mov ecx, eax
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x18]
test ecx, ecx
je 0x40e1e4
jmp 0x40e1c4
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
mov ecx, esi
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
mov ecx, dword [esp + 0x1c]
je 0x40e1e0
inc eax
dec ecx
mov dword [esp + 0x1c], ecx
jne 0x40e1c0
jmp 0x40e1e4
test ecx, ecx
jne 0x40e23b
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40e251
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
add eax, 0x4000
mov ecx, 0x1000
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
mov edi, 0x4000
add edx, edi
cmp esi, edi
mov dword [esp + 0x24], edx
ja 0x40e21b
mov edi, esi
push edi
push eax
push ebx
call fcn.00401160
add esp, 0xc
sub esi, edi
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x2c]
lea eax, [edi + 0x4000]
jmp 0x40e19c
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
sub eax, esi
add eax, edx
add eax, ecx
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x18]
push ecx
call fcn.004021a0
mov edi, dword [esp + 0x34]
add esp, 4
cmp dword [esp + 0x14], 0xffffffff
je 0x40e3ce
mov edx, dword [esp + 0x14]
push edx
push ebx
call fcn.00401200
mov al, byte [esp + 0x1b]
add esp, 8
test al, 0x20
je 0x40e3b7
cmp edi, 0x186a0
jbe 0x40e297
mov esi, edi
mov dword [esp + 0x2c], esi
jmp 0x40e2a3
mov dword [esp + 0x2c], 0x186a0
mov esi, dword [esp + 0x2c]
lea eax, [esi + esi]
push eax
call fcn.0041b140
add esp, 4
mov dword [esp + 0x40], eax
test eax, eax
je 0x40e3aa
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x20], ecx
lea ecx, [eax + esi]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x34], ecx
mov ecx, edi
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
mov dword [esp + 0x28], eax
rep movsb byte es:[edi], byte [esi]
call fcn.00401260
mov edi, eax
mov eax, dword [esp + 0x18]
add esp, 4
sub edi, eax
je 0x40e379
mov esi, dword [esp + 0x2c]
cmp esi, edi
jb 0x40e309
mov esi, edi
mov eax, dword [esp + 0x30]
push eax
push ebx
call fcn.00401200
mov ecx, dword [esp + 0x3c]
push esi
push ecx
push ebx
call fcn.00401160
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x30]
add esp, 0x14
add ecx, esi
test eax, eax
mov dword [esp + 0x30], ecx
je 0x40e361
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.00401200
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
push ebx
call fcn.004011a0
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
add esp, 0x14
add eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
sub edi, esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], eax
jne 0x40e2ff
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x40e39b
mov edx, dword [esp + 0x20]
push edx
push ebx
call fcn.00401200
mov eax, dword [esp + 0x2c]
push esi
push eax
push ebx
call fcn.004011a0
add esp, 0x14
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0041b2a3
add esp, 4
jmp 0x40e3ce
push 0
push ebx
call fcn.00401240
add esp, 8
jmp 0x40e3ce
mov edx, dword [esp + 0x38]
push edi
push edx
push ebx
call fcn.004011a0
push 0
push ebx
call fcn.00401240
add esp, 0x14
push ebx
call fcn.00401360
add esp, 4
mov eax, dword [esp + 0x38]
push eax
call fcn.0041b2a3
add esp, 4
mov eax, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x3c], eax
jne 0x40dfeb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret