Function at 0x415990
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov edx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x58]
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 0x4159b0
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 0x4159d0
add eax, 0x1b
sar ecx, 1
mov edx, ecx
and edx, eax
xor ecx, eax
lea eax, [ecx + edx*2]
test eax, eax
jns 0x4159f4
mov eax, 0xffffffff
jmp 0x4159f6
add eax, eax
push eax
call fcn.00409840
add esp, 4
mov dword [esp + 8], 0xa16ea300
mov dword [esp + 0xc], 0xa503a731
mov dword [esp + 0x10], 0xa906ab03
mov dword [esp + 0x14], 0xad65af48
mov dword [esp + 0x18], 0x91069334
mov dword [esp + 0x1c], 0x9504973b
mov dword [esp + 0x20], 0x99359b01
mov dword [esp + 0x24], 0x9d0c9f09
mov dword [esp + 0x28], 0x8137837c
mov dword [esp + 0x2c], 0x8512872b
mov dword [esp + 0x30], 0x89258b10
mov dword [esp + 0x34], 0x8d278f1a
mov dword [esp + 0x38], 0x71ce7319
mov dword [esp + 0x3c], 0x7770
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x37
ja 0x415ab9
nop
nop
mov esi, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 8]
lea edx, [esi + 0x4f]
add esi, ecx
and edx, ecx
add edx, edx
sub esi, edx
add esi, 0x9945634f
mov dword [esp + 4], esi
mov edx, dword [esp + 4]
add dl, 0xd
mov ecx, dword [esp]
mov byte [esp + ecx + 8], dl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x38
jb 0x415a80
mov ecx, dword [ebp + 4]
movzx edx, word [ecx]
mov edi, eax
test dx, dx
je 0x415ae1
add ecx, 2
mov edi, eax
nop
nop
nop
nop
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x415ad0
mov word [edi], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x415b11
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 0x415b00
mov word [edi], 0
movzx ecx, word [ebx]
mov esi, eax
test cx, cx
je 0x415b41
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 0x415b30
mov word [edi], 0
mov ebp, dword [ebp]
mov eax, 0xfffffffe
nop
nop
cmp word [ebp + eax + 2], 0
lea eax, [eax + 2]
jne 0x415b50
mov ecx, dword [esp + 0x58]
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 0x415b70
mov edx, dword [esp + 0x5c]
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 0x415b90
sar eax, 1
sar ecx, 1
sar edx, 1
add ecx, eax
lea eax, [edx + ecx]
add eax, 0xe
test eax, eax
jns 0x415bb4
mov eax, 0xffffffff
jmp 0x415bbd
add ecx, edx
lea eax, [ecx*2 + 0x1c]
push eax
call fcn.00409840
add esp, 4
mov edi, eax
movzx ecx, word [ebp]
test cx, cx
je 0x415bf2
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 0x415be0
mov word [eax], 0x2f
mov dword [esp + 8], 0xc995cbf9
mov dword [esp + 0xc], 0xc548c74e
mov dword [esp + 0x10], 0xc1b2c3bf
mov dword [esp + 0x14], 0xdda5df51
mov dword [esp + 0x18], 0xd9aadba9
mov dword [esp + 0x1c], 0xd5e7d759
mov dword [esp + 0x20], 0xd3d2
mov byte [esp + 0x24], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x1c
ja 0x415c80
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 8]
add ecx, 0x7478e444
xor ecx, edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 4]
add cl, 0x72
mov edx, dword [esp]
mov byte [esp + edx + 8], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x1d
jb 0x415c50
add eax, 2
mov ecx, dword [esp + 0x58]
mov ecx, dword [ecx + 8]
movzx edx, word [ecx]
test dx, dx
je 0x415cb1
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 0x415ca0
mov word [eax], 0
movzx ecx, word [esp + 8]
test cx, cx
je 0x415ce1
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 0x415cd0
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x415d11
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 0x415d00
mov word [eax], 0
mov dword [esp + 8], 0xabacadf8
mov dword [esp + 0xc], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 7
ja 0x415d6e
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, 0xfedc5791
xor eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
add al, 0xc1
mov ecx, dword [esp]
mov byte [esp + ecx + 8], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 8
jb 0x415d40
lea eax, [esp + 8]
push 0
push 0
push 0
push 0xc00000
push eax
push esi
push edi
push dword [esp + 0x70]
call fcn.00419fa0
add esp, 0x20
mov ebx, eax
jmp dword [0x444d3c]