Function at 0x416050
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x44
mov edx, dword [esp + 0x60]
mov ebp, dword [esp + 0x5c]
mov ecx, dword [ebp + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ecx + eax + 2], 0
lea eax, [eax + 2]
jne 0x416070
sar eax, 1
mov ebx, dword [edx + 4]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x416090
sar ecx, 1
lea edx, [eax + ecx]
add edx, 0x1b
test edx, edx
jns 0x4160ae
mov eax, 0xffffffff
jmp 0x4160b7
add eax, ecx
lea eax, [eax*2 + 0x36]
push eax
call fcn.00409a50
add esp, 4
mov dword [esp + 8], 0x66d389f
mov dword [esp + 0xc], 0x2aa04b4
mov dword [esp + 0x10], 0xeb500a2
mov dword [esp + 0x14], 0xa400c6f
mov dword [esp + 0x18], 0x16b508b3
mov dword [esp + 0x1c], 0x12a714ba
mov dword [esp + 0x20], 0x1eb810ac
mov dword [esp + 0x24], 0x1aaf1cac
mov dword [esp + 0x28], 0x6646187b
mov dword [esp + 0x2c], 0x62d964ca
mov dword [esp + 0x30], 0x6ec860df
mov dword [esp + 0x34], 0x6ac66cdd
mov dword [esp + 0x38], 0x76cd68d4
mov word [esp + 0x3c], 0x7477
mov dword [esp + 0x3e], 0
mov byte [esp + 0x42], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x3a
ja 0x416198
nop
nop
nop
nop
nop
mov esi, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
lea edx, [esi + 0x9d]
add esi, ecx
and edx, ecx
add edx, edx
sub esi, edx
add esi, 0x314c6c9d
mov dword [esp + 4], esi
mov edx, dword [esp + 4]
mov ecx, edx
xor ecx, 0xa6
and edx, 0x59
add edx, edx
sub edx, ecx
mov ecx, dword [esp]
mov byte [esp + ecx + 8], dl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x3b
jb 0x416150
mov ecx, dword [ebp + 4]
movzx edx, word [ecx]
mov edi, eax
test dx, dx
je 0x4161c1
add ecx, 2
mov edi, eax
nop
nop
nop
nop
nop
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x4161b0
mov word [edi], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x4161f1
lea edx, [esp + 0xa]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], cx
add edi, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x4161e0
mov word [edi], 0
movzx ecx, word [ebx]
mov esi, eax
test cx, cx
je 0x416221
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], cx
add edi, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x416210
mov word [edi], 0
mov ebp, dword [ebp]
mov eax, 0xfffffffe
nop
nop
cmp word [ebp + eax + 2], 0
lea eax, [eax + 2]
jne 0x416230
mov ecx, dword [esp + 0x5c]
mov edx, dword [ecx + 8]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edx + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x416250
mov edx, dword [esp + 0x60]
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 0x416270
sar eax, 1
sar ecx, 1
sar edx, 1
add ecx, eax
lea eax, [edx + ecx]
add eax, 0xe
test eax, eax
jns 0x416294
mov eax, 0xffffffff
jmp 0x41629d
add ecx, edx
lea eax, [ecx*2 + 0x1c]
push eax
call fcn.00409a50
add esp, 4
mov edi, eax
movzx ecx, word [ebp]
test cx, cx
je 0x4162d2
add ebp, 2
mov eax, edi
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 0x4162c0
mov word [eax], 0x2f
mov dword [esp + 8], 0xa67ca090
mov dword [esp + 0xc], 0xba4fa42d
mov dword [esp + 0x10], 0xbe4db842
mov dword [esp + 0x14], 0xb24cbc48
mov dword [esp + 0x18], 0xb645b040
mov dword [esp + 0x1c], 0x4a7ab440
mov word [esp + 0x20], 0x4849
mov dword [esp + 0x22], 0
mov byte [esp + 0x26], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x1e
ja 0x416360
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 8]
add ecx, 0x59a8ebea
xor ecx, edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
add cl, 0xb5
mov edx, dword [esp]
mov byte [esp + edx + 8], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x1f
jb 0x416330
add eax, 2
mov ecx, dword [esp + 0x5c]
mov ecx, dword [ecx + 8]
movzx edx, word [ecx]
test dx, dx
je 0x416391
add ecx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], dx
add eax, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x416380
mov word [eax], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x4163c1
lea edx, [esp + 0xa]
nop
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 0x4163b0
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x4163f1
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 0x4163e0
mov word [eax], 0
mov dword [esp + 8], 0x6f686904
mov word [esp + 0xc], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 5
ja 0x41644e
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
add eax, 0x1d667849
xor eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0xdd
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 6
jb 0x416420
lea eax, [esp + 8]
push 0
push 0
push 0
push 0xc00000
push eax
push esi
push edi
push dword [esp + 0x74]
call fcn.0041a3f0
add esp, 0x20
mov ebx, eax
jmp dword [0x447c44]