Function at 0x41d010
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
mov edi, dword [esp + 0x6c]
mov ebp, dword [eax + 4]
mov edx, 0xfffffffe
nop
nop
nop
nop
nop
mov eax, edx
cmp word [ebp + edx + 2], 0
lea edx, [edx + 2]
jne 0x41d030
mov ebx, dword [ecx + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + eax + 2], 0
lea eax, [eax + 2]
jne 0x41d050
sar edx, 1
sar eax, 1
lea ecx, [edx + eax]
mov dword [esp + 0x4c], eax
add eax, edx
add eax, 0x1b
test eax, eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x48], ecx
jns 0x41d07e
mov eax, 0xffffffff
jmp 0x41d085
lea eax, [ecx*2 + 0x36]
push eax
call fcn.00408620
add esp, 4
mov dword [esp + 4], eax
mov dword [esp + 0xa], 0xfca7fa95
mov dword [esp + 0xe], 0xf09cfe82
mov dword [esp + 0x12], 0xf48ff290
mov dword [esp + 0x16], 0x8b2f6d5
mov dword [esp + 0x1a], 0xc7f0a81
mov dword [esp + 0x1e], 0x710e68
mov dword [esp + 0x22], 0x47a0272
mov dword [esp + 0x26], 0x1879067a
mov dword [esp + 0x2a], 0x1c481a39
mov dword [esp + 0x2e], 0x106b1e78
mov dword [esp + 0x32], 0x146a1265
mov dword [esp + 0x36], 0x2870166b
mov dword [esp + 0x3a], 0x2c472a5a
mov word [esp + 0x3e], 0x2e2d
mov eax, 0x71
mov ecx, 0x8e
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax - 0x67]
mov esi, eax
or esi, edx
not edx
or edx, ecx
and edx, esi
add dl, 0x78
mov byte [esp + eax - 0x67], dl
inc eax
dec ecx
cmp eax, 0xa7
jne 0x41d110
movzx ecx, word [ebp]
mov edx, dword [esp + 4]
mov eax, edx
test cx, cx
je 0x41d162
add ebp, 2
mov eax, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebp]
add ebp, 2
test cx, cx
jne 0x41d150
mov word [eax], 0
movzx ecx, word [esp + 0xa]
test cx, cx
je 0x41d191
lea edx, [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x41d180
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x41d1c1
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x41d1b0
mov word [eax], 0
mov esi, dword [edi]
mov eax, 0xfffffffe
nop
nop
nop
cmp word [esi + eax + 2], 0
lea eax, [eax + 2]
jne 0x41d1d0
mov ecx, dword [esp + 0x70]
mov ebp, dword [ecx]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebp + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x41d1f0
mov edx, dword [esp + 0x74]
mov ebx, dword [edx]
mov edx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + edx + 2], 0
lea edx, [edx + 2]
jne 0x41d210
sar eax, 1
sar ecx, 1
sar edx, 1
add ecx, eax
lea eax, [edx + ecx]
add eax, 0x13
test eax, eax
jns 0x41d234
mov eax, 0xffffffff
jmp 0x41d23d
add ecx, edx
lea eax, [ecx*2 + 0x26]
push eax
call fcn.00408620
add esp, 4
movzx ecx, word [esi]
mov edx, eax
test cx, cx
je 0x41d271
add esi, 2
mov edx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edx], cx
add edx, 2
movzx ecx, word [esi]
add esi, 2
test cx, cx
jne 0x41d260
mov dword [esp + 0x44], eax
mov eax, edx
mov word [edx], 0x2f
mov dword [esp + 0xa], 0x87c385eb
mov dword [esp + 0xe], 0x8b3e8930
mov dword [esp + 0x12], 0x8f208d29
mov dword [esp + 0x16], 0x933b9123
mov dword [esp + 0x1a], 0x9738953b
mov dword [esp + 0x1e], 0x9bf5992b
mov dword [esp + 0x22], 0x9d9c
xor edi, edi
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, edi
and esi, 8
mov edx, ecx
xor edx, 0xa4
add edx, esi
xor dl, byte [esp + ecx + 0xa]
add dl, 0xe0
mov byte [esp + ecx + 0xa], dl
inc ecx
add edi, 2
cmp ecx, 0x1c
jne 0x41d2c0
mov esi, eax
add esi, 2
movzx ecx, word [ebp]
test cx, cx
je 0x41d312
add ebp, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], cx
add esi, 2
movzx ecx, word [ebp]
add ebp, 2
test cx, cx
jne 0x41d300
mov word [esi], 0
movzx edx, word [esp + 0xa]
test dx, dx
je 0x41d341
lea ecx, [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], dx
add esi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x41d330
mov word [esi], 0
movzx ecx, word [ebx]
test cx, cx
je 0x41d371
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi], cx
add esi, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x41d360
mov dword [esp + 0x40], esi
mov word [esi], 0
mov dword [esp + 0xa], 0x7c7b7a43
mov eax, 1
mov ebp, 0xffffffff
xor edx, edx
mov edi, 0xe786dcf1
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, dl
and ecx, 1
add ecx, ecx
mov esi, edi
sub esi, ecx
lea ecx, [ebp*2]
or ecx, 0xcf0db9e2
add esi, ebx
add esi, ecx
add esi, 2
movzx ecx, byte [esp + eax + 9]
xor esi, ecx
mov ecx, esi
and ecx, 0x77
add ecx, ecx
xor esi, 0x88
sub ecx, esi
mov byte [esp + eax + 9], cl
inc eax
dec ebp
add ebx, 2
inc edi
inc dl
cmp eax, 5
jne 0x41d3a0
lea eax, [esp + 0xa]
push 0
push 0
push 0xc00000
push eax
mov esi, dword [esp + 0x14]
push esi
mov edi, dword [esp + 0x58]
push edi
push dword [esp + 0x80]
call fcn.00421020
add esp, 0x1c
mov ebx, eax
jmp dword [0x445104]