Function at 0x403ee6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x308
push ebx
lea eax, [ebp - 0x64]
push esi
push edi
push 0x22
push 0
push eax
call fcn.00401056
mov cx, word [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebp + 8]
movzx edx, word [eax]
inc word [ebp + edx*2 - 0x64]
add eax, 2
dec cx
jne 0x403f09
mov ax, word [ebp + 0xc]
cmp word [ebp - 0x64], ax
jne 0x403f33
xor eax, eax
mov ecx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x20]
mov dword [ecx], eax
mov dword [edi], eax
jmp 0x404334
mov cx, 1
mov edi, dword [ebp + 0x20]
mov eax, dword [edi]
mov dword [ebp - 0x10], eax
movzx eax, cx
cmp word [ebp + eax*2 - 0x64], 0
jne 0x403f52
inc cx
cmp cx, 0x10
jbe 0x403f3f
movzx esi, cx
cmp word [ebp - 0x10], cx
mov dword [ebp - 0x14], esi
jae 0x403f61
mov dword [ebp - 0x10], esi
mov dx, 0x10
movzx eax, dx
cmp word [ebp + eax*2 - 0x64], 0
jne 0x403f74
dec dx
jne 0x403f65
movzx eax, dx
cmp dx, word [ebp - 0x10]
mov dword [ebp - 0x20], eax
jae 0x403f83
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [edi], eax
mov eax, 1
shl eax, cl
cmp dx, cx
mov dword [ebp - 0x24], eax
jbe 0x403fb3
movzx eax, cx
movzx ebx, word [ebp + eax*2 - 0x64]
sub dword [ebp - 0x24], ebx
js 0x403fcf
inc cx
mov eax, dword [ebp - 0x24]
add eax, eax
cmp dx, cx
mov dword [ebp - 0x24], eax
ja 0x403f97
mov eax, dword [ebp - 0x20]
lea ecx, [ebp + eax*2 - 0x64]
mov ax, word [ecx]
movzx edi, ax
sub dword [ebp - 0x24], edi
jns 0x403fd9
mov eax, 2
jmp 0x404334
mov eax, 2
jmp 0x404334
add ax, word [ebp - 0x24]
xor edi, edi
dec dx
mov word [ecx], ax
lea eax, [ebp - 0x62]
mov word [ebp - 0x86], di
lea ecx, [ebp - 0x84]
je 0x404006
add di, word [eax]
add eax, 2
mov word [ecx], di
add ecx, 2
dec dx
jne 0x403ff6
xor dx, dx
mov ecx, dword [ebp + 8]
mov ax, word [ecx]
add ecx, 2
test ax, ax
je 0x404034
movzx eax, ax
lea edi, [ebp + eax*2 - 0x88]
mov ax, word [edi]
movzx ebx, ax
inc ax
mov word [ebp + ebx*2 - 0x308], dx
mov word [edi], ax
inc dx
cmp dx, word [ebp + 0xc]
jb 0x40400c
lea eax, [ebp - 0x308]
mov ebx, dword [ebp - 0x10]
neg ebx
mov dword [ebp - 0x28], 0xffffffff
xor edx, edx
mov dword [ebp - 0x30], eax
mov word [ebp - 2], 0
mov dword [ebp - 0xc8], 0
mov word [ebp - 4], dx
cmp dword [ebp - 0x20], esi
mov word [ebp - 0x88], 0
jl 0x4042fa
mov eax, dword [ebp - 0x14]
lea ecx, [ebp + eax*2 - 0x64]
mov ax, word [ecx]
mov dword [ebp - 0x38], ecx
mov word [ebp - 6], ax
mov ax, word [ebp - 6]
dec word [ebp - 6]
test ax, ax
je 0x4042eb
mov eax, dword [ebp - 0x10]
add eax, ebx
cmp eax, dword [ebp - 0x14]
jge 0x4041db
mov eax, dword [ebp - 0x28]
lea ecx, [ebp + eax*4 - 0xc8]
lea edx, [ebp + eax*2 - 0x88]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x34], edx
movzx eax, word [ebp - 6]
mov cx, word [ebp - 0x20]
inc eax
mov word [ebp - 0x40], cx
mov dword [ebp - 0x3c], eax
add dword [ebp - 0x2c], 4
mov dx, word [ebp - 0x40]
add ebx, dword [ebp - 0x10]
sub dx, bx
inc dword [ebp - 0x28]
add dword [ebp - 0x34], 2
cmp dx, word [ebp - 0x10]
jbe 0x4040ef
mov dx, word [ebp - 0x10]
mov ax, word [ebp - 0x14]
sub ax, bx
mov si, 1
mov cl, al
shl si, cl
mov word [ebp - 0xa], ax
movzx eax, si
cmp eax, dword [ebp - 0x3c]
jle 0x40413c
mov ax, word [ebp - 6]
mov ecx, dword [ebp - 0x38]
inc ax
sub si, ax
inc word [ebp - 0xa]
cmp dx, word [ebp - 0xa]
jbe 0x40413c
add si, si
add ecx, 2
mov ax, word [ecx]
cmp si, ax
jbe 0x40413c
sub si, ax
inc word [ebp - 0xa]
cmp dx, word [ebp - 0xa]
ja 0x404121
mov ax, 1
mov cl, byte [ebp - 0xa]
shl ax, cl
mov word [ebp - 4], ax
movzx eax, ax
inc eax
imul eax, eax, 6
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
je 0x40430d
mov cx, word [ebp - 4]
lea edx, [eax + 6]
inc cx
mov esi, dword [ebp + 0x1c]
add word [0x407f16], cx
add eax, 2
mov ecx, dword [ebp - 0x2c]
mov dword [esi], edx
mov dword [ebp + 0x1c], eax
mov dword [eax], 0
lea eax, [ebp - 0x88]
mov dword [ecx], edx
cmp dword [ebp - 0x34], eax
je 0x4041cd
mov ax, word [ebp - 2]
mov ecx, dword [ebp - 0x34]
mov word [ecx], ax
mov dword [ebp - 0x1a], edx
mov cl, byte [ebp - 0x10]
mov al, byte [ebp - 0xa]
add al, 0x10
lea esi, [ebp - 0x1c]
mov byte [ebp - 0x1b], cl
mov byte [ebp - 0x1c], al
mov ax, word [ebp - 2]
mov cx, bx
sub cl, byte [ebp - 0x10]
shr ax, cl
movzx edi, ax
mov eax, dword [ebp - 0x2c]
imul edi, edi, 6
add edi, dword [eax - 4]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, dword [ebp - 0x10]
add eax, ebx
cmp eax, dword [ebp - 0x14]
jl 0x4040d0
movzx eax, word [ebp + 0xc]
mov cl, byte [ebp - 0x14]
lea esi, [ebp + eax*2 - 0x308]
sub cl, bl
cmp esi, dword [ebp - 0x30]
mov byte [ebp - 0x1b], cl
ja 0x4041f9
mov byte [ebp - 0x1c], 0x63
jmp 0x404242
mov eax, dword [ebp - 0x30]
mov si, word [eax]
cmp word [ebp + 0x10], si
jbe 0x40421a
mov byte [ebp - 0xc], 0x10
cmp si, 0x100
adc byte [ebp - 0xc], 0xff
mov al, byte [ebp - 0xc]
mov byte [ebp - 0x1c], al
jmp 0x40423a
movzx eax, si
movzx esi, word [ebp + 0x10]
sub eax, esi
mov edi, dword [ebp + 0x18]
lea esi, [eax*2]
mov al, byte [esi + edi]
mov edi, dword [ebp + 0x14]
mov si, word [esi + edi]
mov byte [ebp - 0x1c], al
add dword [ebp - 0x30], 2
mov word [ebp - 0x1a], si
mov ax, 1
shl ax, cl
mov word [ebp - 0x2a], ax
mov cl, bl
mov ax, word [ebp - 2]
shr ax, cl
mov word [ebp - 0xa], ax
cmp word [ebp - 4], ax
jbe 0x404282
movzx eax, word [ebp - 0xa]
imul eax, eax, 6
lea esi, [ebp - 0x1c]
lea edi, [eax + edx]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov cx, word [ebp - 0x2a]
add word [ebp - 0xa], cx
mov si, word [ebp - 0xa]
cmp word [ebp - 4], si
ja 0x404260
mov ax, 1
mov cl, byte [ebp - 0x14]
dec cl
shl ax, cl
test word [ebp - 2], ax
je 0x4042a1
xor word [ebp - 2], ax
shr ax, 1
test word [ebp - 2], ax
jne 0x404294
xor word [ebp - 2], ax
mov edi, 1
mov eax, dword [ebp - 0x28]
mov cl, bl
shl edi, cl
lea eax, [ebp + eax*2 - 0x88]
dec edi
movzx esi, word [ebp - 2]
movzx ecx, word [eax]
and edi, esi
cmp edi, ecx
je 0x40408a
sub eax, 2
sub ebx, dword [ebp - 0x10]
mov edi, 1
mov cl, bl
shl edi, cl
dec edi
dec dword [ebp - 0x28]
movzx ecx, word [eax]
and edi, esi
cmp edi, ecx
jne 0x4042ca
jmp 0x40408a
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x20], eax
jge 0x404079
cmp dword [ebp - 0x24], 0
je 0x404332
cmp dword [ebp - 0x20], 1
je 0x404332
mov eax, 1
jmp 0x404334
cmp dword [ebp - 0x28], 0
je 0x404321
push dword [ebp - 0xc8]
call fcn.0040433b
add esp, 4
push str.not_enough_memory
call fcn.00401174
mov eax, 3
jmp 0x404334
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret