Function at 0x404f10
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x318
mov eax, dword [0x4191a0]
xor eax, esp
mov dword [esp + 0x314], eax
mov eax, dword [esp + 0x320]
push ebx
mov ebx, dword [esp + 0x338]
push ebp
push esi
mov esi, dword [esp + 0x328]
push edi
mov edi, dword [esp + 0x340]
movzx ebp, ax
xor eax, eax
push 0x22
push eax
lea eax, [esp + 0xa4]
mov dword [esp + 0x24], esi
push eax
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], edi
mov dword [esp + 0x48], ebx
call fcn.00403490
add esp, 0xc
movzx edx, bp
mov ecx, esi
movzx eax, word [ecx]
add edx, 0xffff
lea ecx, [ecx + 2]
inc word [esp + eax*2 + 0x9c]
test dx, dx
jne 0x404f71
cmp word [esp + 0x9c], bp
jne 0x404f9f
xor eax, eax
mov dword [edi], eax
mov dword [ebx], eax
jmp 0x40546d
mov ecx, dword [ebx]
xor ebp, ebp
push 0x10
pop edx
xor ebx, ebx
lea edi, [ebp + 1]
mov dword [esp + 0x10], edi
mov si, di
movzx eax, si
cmp word [esp + eax*2 + 0x9c], bx
jne 0x404fcc
inc edi
mov si, di
mov dword [esp + 0x10], edi
cmp si, dx
jbe 0x404fb2
mov ebx, dword [esp + 0x3c]
cmp cx, si
movzx eax, si
cmovb ecx, eax
mov dword [esp + 0x18], eax
xor ebp, ebp
movzx eax, dx
cmp word [esp + eax*2 + 0x9c], bp
jne 0x404ff7
add edx, 0xffff
test dx, dx
jne 0x404fdf
cmp cx, dx
movzx eax, dx
mov dword [esp + 0x30], eax
cmova ecx, eax
xor ebp, ebp
mov dword [ebx], ecx
inc ebp
mov dword [esp + 0x28], ecx
mov ebx, ebp
mov ecx, dword [esp + 0x18]
shl ebx, cl
cmp si, dx
jae 0x405040
movzx eax, si
movzx eax, word [esp + eax*2 + 0x9c]
sub ebx, eax
js 0x4051f8
inc edi
add ebx, ebx
mov si, di
mov dword [esp + 0x10], edi
cmp si, dx
jb 0x40501a
mov eax, dword [esp + 0x30]
movzx ecx, word [esp + eax*2 + 0x9c]
sub ebx, ecx
mov dword [esp + 0x3c], ebx
js 0x4051f8
lea eax, [ecx + ebx]
mov edi, 0xffff
mov ecx, dword [esp + 0x30]
xor esi, esi
add edx, edi
mov dword [esp + 0x10], esi
mov word [esp + ecx*2 + 0x9c], ax
xor eax, eax
mov word [esp + 0xc2], ax
test dx, dx
je 0x40509c
mov cx, si
add cx, word [esp + eax + 0x9e]
lea eax, [eax + 2]
add edx, edi
mov word [esp + eax + 0xc2], cx
test dx, dx
jne 0x405082
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x50]
movzx eax, word [ecx]
add ecx, 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], ecx
test ax, ax
je 0x4050db
movzx edx, ax
movzx ecx, word [esp + edx*2 + 0xc0]
mov eax, ecx
mov word [esp + eax*2 + 0xe4], si
lea eax, [ecx + 1]
mov ecx, dword [esp + 0x1c]
mov word [esp + edx*2 + 0xc0], ax
inc esi
cmp si, di
jb 0x4050a4
mov ecx, dword [esp + 0x28]
xor eax, eax
xor esi, esi
mov word [esp + 0xc0], ax
lea eax, [esp + 0xe4]
mov dword [esp + 0x38], esi
mov dword [esp + 0x4c], eax
neg ecx
mov eax, dword [esp + 0x18]
or edi, 0xffffffff
mov dword [esp + 0x5c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x2c], ecx
cmp eax, esi
jg 0x40545f
lea edx, [esp + 0x9c]
lea edx, [edx + eax*2]
mov dword [esp + 0x1c], edx
movzx edx, word [edx]
mov dword [esp + 0x44], edx
test dx, dx
mov edx, dword [esp + 0x28]
je 0x405423
mov esi, dword [esp + 0x44]
add esi, 0xffff
add edx, ecx
mov dword [esp + 0x44], esi
cmp eax, edx
jle 0x4052a7
movzx eax, si
inc eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x30]
mov esi, edx
movzx ecx, si
inc edi
sub eax, ecx
mov dword [esp + 0x58], ecx
movzx ecx, ax
mov dword [esp + 0x2c], esi
mov edx, ecx
mov esi, dword [esp + 0x28]
cmp cx, si
movzx eax, si
cmova edx, eax
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x58]
movzx esi, dx
movzx edx, ax
mov eax, ebp
mov cl, dl
mov dword [esp + 0x40], esi
shl ax, cl
mov byte [esp + 0x17], cl
movzx ecx, ax
mov dword [esp + 0x10], edx
cmp ecx, dword [esp + 0x34]
jle 0x405200
mov eax, 0xffff
sub eax, dword [esp + 0x44]
add ecx, eax
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x10], edx
cmp dx, si
jae 0x4051ee
mov ebp, esi
lea eax, [eax + 2]
add ecx, ecx
movzx esi, word [eax]
cmp cx, si
jbe 0x4051eb
sub ecx, esi
inc edx
mov dword [esp + 0x10], edx
cmp dx, bp
jb 0x4051d2
xor ebp, ebp
inc ebp
mov cl, byte [esp + 0x10]
mov byte [esp + 0x17], cl
jmp 0x405204
push 2
pop eax
jmp 0x40546d
mov cl, byte [esp + 0x17]
mov eax, ebp
shl ax, cl
movzx esi, ax
movzx eax, si
inc eax
mov dword [esp + 0x48], esi
imul eax, eax, 6
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
je 0x40543a
mov edx, dword [esp + 0x54]
lea ecx, [esi + 1]
add word [0x41cdbc], cx
lea ecx, [eax + 6]
add eax, 2
mov dword [esp + 0x40], ecx
mov dword [esp + 0x54], eax
mov dword [edx], ecx
xor edx, edx
mov dword [esp + edi*4 + 0x5c], ecx
mov dword [eax], edx
mov edx, dword [esp + 0x28]
test edi, edi
je 0x405295
mov al, byte [esp + 0x17]
mov esi, dword [esp + 0x38]
add al, 0x10
mov dword [esp + 0x22], ecx
mov cl, byte [esp + 0x58]
mov byte [esp + 0x20], al
sub cl, dl
movzx eax, si
shr eax, cl
imul ecx, eax, 6
mov byte [esp + 0x21], dl
mov eax, dword [esp + 0x20]
mov word [esp + edi*2 + 0xc0], si
add ecx, dword [esp + edi*4 + 0x58]
mov dword [ecx], eax
mov ax, word [esp + 0x24]
mov word [ecx + 4], ax
mov ecx, dword [esp + 0x2c]
add edx, ecx
mov eax, dword [esp + 0x18]
cmp eax, edx
jg 0x405167
sub al, cl
lea edx, [esp + 0xe4]
mov byte [esp + 0x21], al
mov eax, dword [esp + 0x50]
movzx eax, ax
lea eax, [edx + eax*2]
mov edx, dword [esp + 0x4c]
cmp edx, eax
jb 0x4052cd
mov byte [esp + 0x20], 0x63
jmp 0x40531f
movzx ecx, word [edx]
mov ax, word [esp + 0x334]
cmp cx, ax
jae 0x4052f5
mov eax, pe_nt_image_headers32
mov word [esp + 0x22], cx
cmp cx, ax
setb al
add al, 0xf
mov byte [esp + 0x20], al
jmp 0x405318
movzx eax, ax
sub ecx, eax
mov eax, dword [esp + 0x33c]
mov al, byte [eax + ecx*2]
mov byte [esp + 0x20], al
mov eax, dword [esp + 0x338]
mov ax, word [eax + ecx*2]
mov word [esp + 0x22], ax
add edx, 2
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x18]
mov eax, ebp
mov esi, dword [esp + 0x2c]
mov ecx, edx
sub ecx, esi
shl ax, cl
mov cx, si
movzx eax, ax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
shr ax, cl
movzx ecx, ax
mov ax, cx
mov dword [esp + 0x10], ecx
cmp ax, word [esp + 0x48]
jae 0x40538a
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
mov bx, word [esp + 0x24]
movzx eax, ax
add ecx, edx
imul eax, eax, 6
mov dword [esp + 0x10], ecx
add eax, dword [esp + 0x40]
mov dword [eax], esi
mov word [eax + 4], bx
mov ax, cx
cmp ax, word [esp + 0x48]
jb 0x40535f
mov ebx, dword [esp + 0x3c]
xor ebp, ebp
mov edx, dword [esp + 0x18]
inc ebp
mov esi, dword [esp + 0x38]
lea ecx, [edx - 1]
mov eax, ebp
shl ax, cl
movzx ecx, ax
mov eax, ecx
mov dword [esp + 0x10], ecx
and eax, esi
test ax, ax
je 0x4053c0
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 0x4053a9
xor esi, ecx
mov edx, ebp
mov ecx, dword [esp + 0x2c]
shl edx, cl
movzx eax, si
dec edx
and edx, eax
mov dword [esp + 0x34], eax
movzx eax, word [esp + edi*2 + 0xc0]
mov dword [esp + 0x38], esi
cmp edx, eax
je 0x40540a
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x34]
movzx eax, word [esp + edi*2 + 0xbe]
sub ecx, esi
dec edi
mov edx, ebp
shl edx, cl
dec edx
and edx, ebx
cmp edx, eax
jne 0x4053ec
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x2c], ecx
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
test si, si
jne 0x40514b
mov esi, dword [esp + 0x30]
add dword [esp + 0x1c], 2
inc eax
mov dword [esp + 0x18], eax
cmp eax, esi
jg 0x40545f
mov edx, dword [esp + 0x1c]
jmp 0x405133
test edi, edi
je 0x405448
push dword [esp + 0x5c]
call fcn.00405486
pop ecx
push 0x7d3
call fcn.004034be
push eax
call fcn.0040201a
push 3
jmp 0x4051fa
test ebx, ebx
je 0x405467
cmp esi, ebp
jne 0x40546b
xor eax, eax
mov ebp, eax
mov eax, ebp
mov ecx, dword [esp + 0x324]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00406a89
add esp, 0x318
ret