Function at 0x404e0a
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x31c
mov eax, dword [0x4151a0]
xor eax, esp
mov dword [esp + 0x318], eax
push ebx
movzx ebx, word [esp + 0x328]
push ebp
mov ebp, dword [esp + 0x340]
push esi
mov esi, dword [esp + 0x32c]
push edi
mov edi, dword [esp + 0x344]
xor eax, eax
push 0x22
push eax
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x60], edi
call fcn.00403368
add esp, 0xc
mov ecx, esi
movzx edx, bx
movzx eax, word [ecx]
add edx, 0xffff
inc word [esp + eax*2 + 0xa0]
lea ecx, [ecx + 2]
test dx, dx
jne 0x404e65
cmp word [esp + 0xa0], bx
jne 0x404e94
xor eax, eax
mov dword [edi], eax
mov dword [ebp], eax
jmp 0x40534b
mov ebx, dword [ebp]
xor esi, esi
inc esi
push 0x10
mov dword [esp + 0x14], esi
pop edx
mov di, si
xor ecx, ecx
movzx eax, di
cmp word [esp + eax*2 + 0xa0], cx
jne 0x404ec0
inc esi
mov di, si
mov dword [esp + 0x10], esi
cmp di, dx
jbe 0x404ea6
movzx ecx, di
cmp bx, di
cmovb ebx, ecx
mov dword [esp + 0x24], ecx
xor edi, edi
movzx eax, dx
cmp word [esp + eax*2 + 0xa0], di
jne 0x404ee7
add edx, 0xffff
test dx, dx
jne 0x404ecf
movzx eax, dx
cmp bx, dx
cmova ebx, eax
xor edi, edi
inc edi
mov dword [ebp], ebx
mov ebp, edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], ebx
shl ebp, cl
jmp 0x404f22
movzx eax, word [esp + ecx*2 + 0xa0]
sub ebp, eax
js 0x405028
mov eax, dword [esp + 0x34]
inc esi
mov dword [esp + 0x10], esi
add ebp, ebp
movzx ecx, si
cmp ecx, eax
jl 0x404f04
movzx ecx, word [esp + eax*2 + 0xa0]
sub ebp, ecx
mov dword [esp + 0x58], ebp
js 0x405028
lea eax, [ecx + ebp]
mov ecx, dword [esp + 0x34]
xor esi, esi
mov word [esp + ecx*2 + 0xa0], ax
xor eax, eax
add edx, 0xffff
mov dword [esp + 0x10], esi
mov word [esp + 0xc6], ax
test dx, dx
je 0x404f85
mov cx, si
add cx, word [esp + eax + 0xa2]
add edx, 0xffff
mov word [esp + eax + 0xc8], cx
lea eax, [eax + 2]
test dx, dx
jne 0x404f67
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x5c]
movzx eax, word [ecx]
add ecx, 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
test ax, ax
je 0x404fc4
movzx edx, ax
movzx ecx, word [esp + edx*2 + 0xc4]
mov eax, ecx
mov word [esp + eax*2 + 0xe8], si
lea eax, [ecx + 1]
mov ecx, dword [esp + 0x18]
mov word [esp + edx*2 + 0xc4], ax
inc esi
cmp si, bx
jb 0x404f8d
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
xor eax, eax
mov word [esp + 0xc4], ax
lea eax, [esp + 0xe8]
mov dword [esp + 0x4c], eax
or eax, 0xffffffff
xor ecx, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
neg ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x30], ecx
cmp eax, edx
jg 0x40533f
lea ecx, [esp + 0xa0]
lea ecx, [ecx + eax*2]
mov dword [esp + 0x50], ecx
movzx ecx, word [ecx]
jmp 0x40531c
push 2
pop eax
jmp 0x40534b
add ecx, 0xffff
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x28]
lea esi, [ebx + ecx]
cmp eax, esi
jle 0x4051a2
mov eax, dword [esp + 0x44]
movzx eax, ax
inc eax
sub ebx, ecx
mov dword [esp + 0x38], eax
mov eax, ebx
jmp 0x40505f
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x28]
inc dword [esp + 0x2c]
add eax, ecx
mov ebx, esi
movzx esi, bx
sub edx, esi
movzx ecx, dx
mov dword [esp + 0x3c], eax
movzx eax, di
cmp cx, di
mov edx, ecx
cmova edx, eax
movzx eax, dx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x24]
sub eax, esi
movzx edx, ax
xor edi, edi
inc edi
mov cl, dl
mov eax, edi
shl ax, cl
mov byte [esp + 0x17], cl
mov dword [esp + 0x48], ebx
mov dword [esp + 0x10], edx
movzx ecx, ax
cmp ecx, dword [esp + 0x38]
jle 0x4050f4
mov esi, dword [esp + 0x50]
mov eax, 0xffff
sub eax, dword [esp + 0x44]
add ecx, eax
mov eax, dword [esp + 0x40]
movzx eax, ax
mov dword [esp + 0x30], eax
jmp 0x4050dc
lea esi, [esi + 2]
add ecx, ecx
movzx eax, word [esi]
cmp cx, ax
jbe 0x4050ea
sub ecx, eax
inc edx
movzx eax, dx
mov dword [esp + 0x10], edx
cmp eax, dword [esp + 0x30]
jl 0x4050cd
mov cl, byte [esp + 0x10]
mov byte [esp + 0x17], cl
jmp 0x4050f8
mov cl, byte [esp + 0x17]
mov eax, edi
shl ax, cl
movzx esi, ax
movzx eax, si
inc eax
imul eax, eax, 6
push eax
push 0x40
mov dword [esp + 0x38], esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
je 0x405364
lea ecx, [esi + 1]
add word [0x418a7c], cx
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x2c]
lea edx, [eax + 6]
add eax, 2
mov dword [ecx], edx
xor ecx, ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x54], eax
mov dword [eax], ecx
mov dword [esp + esi*4 + 0x60], edx
test esi, esi
je 0x40518b
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1e], edx
movzx edx, cx
mov word [esp + esi*2 + 0xc4], cx
mov cl, byte [esp + 0x3c]
shr edx, cl
mov byte [esp + 0x1d], al
mov al, byte [esp + 0x17]
add al, 0x10
imul edx, edx, 6
add edx, dword [esp + esi*4 + 0x5c]
mov byte [esp + 0x1c], al
mov eax, dword [esp + 0x1c]
mov dword [edx], eax
mov ax, word [esp + 0x20]
mov word [edx + 4], ax
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x34]
lea esi, [ebx + ecx]
cmp eax, esi
jg 0x40505b
sub al, bl
mov byte [esp + 0x1d], al
mov eax, dword [esp + 0x5c]
movzx eax, ax
lea edx, [esp + 0xe8]
lea eax, [edx + eax*2]
mov edx, dword [esp + 0x4c]
cmp edx, eax
jb 0x4051c8
mov byte [esp + 0x1c], 0x63
jmp 0x40521a
movzx ecx, word [edx]
mov ax, word [esp + 0x338]
cmp cx, ax
jae 0x4051f0
mov eax, 0x100
cmp cx, ax
setb al
add al, 0xf
mov byte [esp + 0x1c], al
mov word [esp + 0x1e], cx
jmp 0x405213
movzx eax, ax
sub ecx, eax
mov eax, dword [esp + 0x340]
mov al, byte [eax + ecx*2]
mov byte [esp + 0x1c], al
mov eax, dword [esp + 0x33c]
mov ax, word [eax + ecx*2]
mov word [esp + 0x1e], ax
add edx, 2
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
mov ecx, edx
sub ecx, ebx
mov eax, edi
shl ax, cl
mov cx, bx
movzx eax, ax
mov dword [esp + 0x38], eax
mov eax, esi
shr ax, cl
movzx ecx, ax
mov eax, dword [esp + 0x30]
movzx eax, ax
mov dword [esp + 0x3c], eax
movzx eax, cx
mov dword [esp + 0x10], ecx
cmp eax, dword [esp + 0x3c]
jge 0x40528e
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x38]
mov bx, word [esp + 0x20]
imul eax, eax, 6
add eax, dword [esp + 0x40]
add ecx, ebp
mov dword [esp + 0x10], ecx
mov dword [eax], edx
mov word [eax + 4], bx
movzx eax, cx
cmp eax, dword [esp + 0x3c]
jl 0x405262
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x58]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
lea ecx, [edx - 1]
mov eax, edi
shl ax, cl
movzx ecx, ax
mov eax, ecx
and eax, esi
mov dword [esp + 0x10], ecx
test ax, ax
je 0x4052c0
mov dx, cx
shr dx, 1
xor esi, ecx
mov word [esp + 0x10], dx
mov ecx, dword [esp + 0x10]
mov eax, ecx
and eax, esi
test ax, ax
jne 0x4052a9
xor esi, ecx
mov edx, edi
mov ecx, ebx
shl edx, cl
movzx eax, si
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x2c]
dec edx
and edx, eax
mov dword [esp + 0x38], eax
movzx eax, word [esp + esi*2 + 0xc4]
cmp edx, eax
je 0x405310
mov ebp, dword [esp + 0x38]
sub ebx, dword [esp + 0x28]
movzx eax, word [esp + esi*2 + 0xc2]
mov edx, edi
mov ecx, ebx
shl edx, cl
dec esi
dec edx
and edx, ebp
cmp edx, eax
jne 0x4052ea
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x48], ebx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
test cx, cx
jne 0x405030
mov ecx, dword [esp + 0x50]
inc eax
add ecx, 2
mov dword [esp + 0x24], eax
mov dword [esp + 0x50], ecx
cmp eax, edx
jle 0x405020
xor ecx, ecx
test ebp, ebp
je 0x405347
cmp edx, edi
jne 0x405349
mov edi, ecx
mov eax, edi
mov ecx, dword [esp + 0x328]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00406929
add esp, 0x31c
ret
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x405376
push dword [esp + 0x60]
call fcn.0040538d
pop ecx
push 0x7d3
call fcn.00403396
push eax
call fcn.00401ebd
push 3
jmp 0x40502a